2022-04-30 11:13 PM
hey there
I have a question: can a micro, say stm32f407 detect low power? for example is there a HAL function to indicate VDD lower that 3.3v?
(this way any time that power is going, I can for example save everything before power off)
Solved! Go to Solution.
2022-04-30 11:36 PM
You can measure Vdd in software using ADC and VREFINT. But there is no single HAL function doing everything for you. You can also use hardware features. Check for brownout reset (BOR) and/or programmable voltage detector (PVD) in the ref. man..
hth
KnarfB
2022-04-30 11:32 PM
By measuring the internal voltage reference using ADC, you in turn determine voltage of VREF+. If you have that tied to VDDA and that one to VDD, you can detect decrease of VDD.
Similarly, if you don't use battery, you can connect VDD to VBAT and use the VBAT measurement in ADC to determine VDD decrease.
JW
2022-04-30 11:36 PM
You can measure Vdd in software using ADC and VREFINT. But there is no single HAL function doing everything for you. You can also use hardware features. Check for brownout reset (BOR) and/or programmable voltage detector (PVD) in the ref. man..
hth
KnarfB