cancel
Showing results for 
Search instead for 
Did you mean: 

I am using STM32L031F4P. I want to use it Programmable Voltage Detector to detect the voltage of its power supply. I am not finding any library to use. I want to have some coding help and its library file.

Prajnyajit
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2
KnarfB
Principal III
gbm
Lead III

Read the description of PWR module, PVD section. Write 5 lines of code/simple C instructions: set 2 registers (PWR->CR, EXTI->IMR), wait for PVDO, if needed - enable PVD interrupt in EXTI, then in NVIC. That's all.