Skip to main content
Explorer
June 24, 2024
Solved

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

  • June 24, 2024
  • 2 replies
  • 1181 views

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

 

 

    This topic has been closed for replies.
    Best answer by Melc_dB

    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

    2 replies

    ST Employee
    July 1, 2024

    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_dBAnswer
    ST Employee
    July 2, 2024

    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