cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup PVD STM32U5xx with system VDD running at 1.85v

VPHAM.1
Associate

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();

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Melc_dB
ST Employee

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

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Dor_RH
ST Employee

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.

Dor_RH_0-1719844664332.png

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

Melc_dB
ST Employee

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

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.