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
 
This discussion is locked. Please start a new topic to ask your question.
1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2
KnarfB
Super User
gbm
Principal

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.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice