ADC阻塞?
This commit is contained in:
parent
1f6020a3a9
commit
7f7045189f
|
@ -30,6 +30,7 @@ uint16_t max_number = 0;
|
||||||
double voltage = 0;
|
double voltage = 0;
|
||||||
|
|
||||||
// https://www.cnblogs.com/iot-fan/p/14304854.html
|
// https://www.cnblogs.com/iot-fan/p/14304854.html
|
||||||
|
__HIGH_CODE
|
||||||
uint8_t BSP_ReadVbat(void)
|
uint8_t BSP_ReadVbat(void)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
@ -43,6 +44,7 @@ uint8_t BSP_ReadVbat(void)
|
||||||
// DelayUs(50);
|
// DelayUs(50);
|
||||||
ADC_InterBATSampInit();
|
ADC_InterBATSampInit();
|
||||||
DelayUs(1);
|
DelayUs(1);
|
||||||
|
// TODO:这里有死循环
|
||||||
ADC_ExcutSingleConver();
|
ADC_ExcutSingleConver();
|
||||||
DelayUs(1);
|
DelayUs(1);
|
||||||
ADC_ExcutSingleConver();
|
ADC_ExcutSingleConver();
|
||||||
|
|
Loading…
Reference in New Issue