Skip to content

Commit

Permalink
1.由于mcu vbat口高阻,肖特基二极管的压降可以忽略,修改电压adc;
Browse files Browse the repository at this point in the history
2.ChibiOS改成子程序,可以同步,不需要手动复制了。
  • Loading branch information
hugen79 committed Sep 20, 2019
1 parent 7adbc5b commit e6ade8f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .cproject
Expand Up @@ -555,13 +555,13 @@

</configuration>

<configuration configurationName="800MHz">
<configuration configurationName="800Mhz">

<resource resourceType="PROJECT" workspacePath="/NanoVNA-H"/>

</configuration>

<configuration configurationName="800Mhz">
<configuration configurationName="800MHz">

<resource resourceType="PROJECT" workspacePath="/NanoVNA-H"/>

Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
@@ -0,0 +1,4 @@
[submodule "ChibiOS"]
path = ChibiOS
url = https://github.com/edy555/ChibiOS.git
branch = I2SFULLDUPLEX
1 change: 1 addition & 0 deletions ChibiOS
Submodule ChibiOS added at 669d4b
3 changes: 1 addition & 2 deletions adc.c
Expand Up @@ -78,7 +78,6 @@ uint16_t adc_single_read(ADC_TypeDef *adc, uint32_t chsel)
int16_t adc_vbat_read(ADC_TypeDef *adc)
{
#define ADC_FULL_SCALE 3300
#define VBAT_DIODE_VF 500
#define VREFINT_CAL (*((uint16_t*)0x1FFFF7BA))
float vbat = 0;
float vrefint = 0;
Expand All @@ -97,7 +96,7 @@ int16_t adc_vbat_read(ADC_TypeDef *adc)
return -1;
}

return vbat_raw + VBAT_DIODE_VF;
return vbat_raw;

}

Expand Down

0 comments on commit e6ade8f

Please sign in to comment.