2024-06-24 07:24 AM
Hello,
As mentioned in the title, the custom board system VDD is 1.85 volt, I wonder if there are anyways that I can setup the PVD to work with such voltage. I follow the example and I only get the interrupt at startup but then cutting power off, obviously I see no other interrupt.
HAL_NVIC_SetPriority(PVD_PVM_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(PVD_PVM_IRQn);
PWR_PVDTypeDef ConfigPVD;
ConfigPVD.Mode = PWR_PVD_MODE_IT_RISING_FALLING;
ConfigPVD.PVDLevel = PWR_PVDLEVEL_0;
HAL_PWR_ConfigPVD(&ConfigPVD);
HAL_PWR_EnablePVD();
Solved! Go to Solution.
2024-07-02 05:38 AM
Hello @VPHAM.1,
As told by @Dor_RH you can not use PVD with a VDD of 1,85V, but you can use a comparator instead.
Use a voltage divider from VDD and compare it with VREFINT(1.2V) or VREFINT_DIVX .
Choose the voltage divider resistors to set you threshold.
Then program an interrupt from the comparator rising or falling(depending on your configuration) edge.
Hope that will help you,
Best regards,
Melchior
2024-07-01 07:47 AM
Hello @VPHAM.1,
To meet your 1.85 volt requirement, you'll need to choose the nearest PVD threshold level available on STM32 microcontrollers. For exact threshold values, please refer to the Datasheet - STM32U5Axxx
In your case, exact correspondence with 1.85V is not available, so opt for the next higher threshold.
That's why could you try to modify:
ConfigPVD.Mode = PWR_PVD_MODE_IT_FALLING;
I hope my answer has helped you. When your question is answered, please select this topic as solution that answered you, it will help others find that answer faster.
Thanks for your contribution.
Dor_RH
2024-07-02 05:38 AM
Hello @VPHAM.1,
As told by @Dor_RH you can not use PVD with a VDD of 1,85V, but you can use a comparator instead.
Use a voltage divider from VDD and compare it with VREFINT(1.2V) or VREFINT_DIVX .
Choose the voltage divider resistors to set you threshold.
Then program an interrupt from the comparator rising or falling(depending on your configuration) edge.
Hope that will help you,
Best regards,
Melchior