cancel
Showing results for 
Search instead for 
Did you mean: 

Does micro detects low power?

Ala
Senior

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)

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

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

View solution in original post

2 REPLIES 2

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

KnarfB
Principal III

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