AnsweredAssumed Answered

Overvoltage Detection (PVD) on the STM32F429ZI

Question asked by Georg Stroh on May 15, 2018
Latest reply on May 15, 2018 by waclawek.jan
Hey guys, 
I'm trying to activate the Overvoltage detection (PVD) on the STM32F429ZIT6. 
But I'm not reallly sure if I got it right. 
Datasheet DocID024030 Rev 10 page 29:
The device also features an embedded programmable voltage detector (PVD) that monitors the VDD/VDDA power supply and compares it to the VPVD threshold. An interrupt can be generated when VDD/VDDA drops below the VPVD threshold and/or when VDD/VDDA is higher than the VPVD threshold. The interrupt service routine can then generate a warning message and/or put the MCU into a safe state. The PVD is enabled by software.
The RM0090 states:
Programmable voltage detector (PVD)
You can use the PVD to monitor the VDD power supply by comparing it to a threshold
selected by the PLS[2:0] bits in the PWR power control register (PWR_CR) for
STM32F405xx/07xx and STM32F415xx/17xx and PWR power control register (PWR_CR)
for STM32F42xxx and STM32F43xxx.
The PVD is enabled by setting the PVDE bit.
A PVDO flag is available, in the PWR power control/status register (PWR_CSR) for
STM32F405xx/07xx and STM32F415xx/17xx, to indicate if VDD is higher or lower than the
PVD threshold. This event is internally connected to the EXTI line16 and can generate an
interrupt if enabled through the EXTI registers. The PVD output interrupt can be generated
when VDD drops below the PVD threshold and/or when VDD rises above the PVD threshold
depending on EXTI line16 rising/falling edge configuration. As an example the service
routine could perform emergency shutdown tasks.
So I'm not really sure if the STM32F429 has a overvoltage detection or does the second paragraph only describing the features of the STM32F407/STM32F417 ?
When we configure the PVD with the Values stated in the RM0090 the undervoltage is detected (EXTI_16 called) like configured but not the overvoltage. 
int main(void)
{

  /* USER CODE BEGIN 1 */

  /* USER CODE END 1 */

  /* MCU Configuration----------------------------------------------------------*/

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();

  /* Initialize all configured peripherals */



  /* USER CODE BEGIN 2 */
     /** Configure LEDs*/
     __GPIOB_CLK_ENABLE();
     GPIO_Pin.Pin = GPIO_PIN_7|GPIO_PIN_14;
     GPIO_Pin.Mode = GPIO_MODE_OUTPUT_PP;
     HAL_GPIO_Init(GPIOB,&GPIO_Pin);
     HAL_GPIO_WritePin(GPIOB,GPIO_PIN_7,GPIO_PIN_SET);

  /** Enable PVD*/
     sConfigPVD.Mode = PWR_PVD_MODE_IT_RISING_FALLING;
     /** Datasheet p. 99
     PLS[2:0]=111 (rising edge) 3.07 3.14 3.21 V
     PLS[2:0]=111 (falling edge) 2.95 3.03 3.09 V*/

     sConfigPVD.PVDLevel =PWR_PVDLEVEL_7;
   HAL_PWR_ConfigPVD(&sConfigPVD);
     HAL_PWR_EnablePVD();
  /* USER CODE END 2 */
  /* Initialize interrupts */
  MX_NVIC_Init();
  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

  }
  /* USER CODE END 3 */

}


/** NVIC Configuration
*/

static void MX_NVIC_Init(void)
{
  /* PVD_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(PVD_IRQn, 0, 0);
  HAL_NVIC_EnableIRQ(PVD_IRQn);
}

/* USER CODE BEGIN 4 */
void HAL_PWR_PVDCallback(void)
{
     HAL_GPIO_WritePin(GPIOB,GPIO_PIN_14,GPIO_PIN_SET);
}
/* USER CODE END 4 */

We connected the for the PVD Test a STM32F429 Nucleo Board over a 
laboratory power supply (VDD on JP5: IDD Measurement, GND to GND). 
When we reduce the Voltage under the configured value, the ISR for the PVD is called. But when we increase the voltage over the Threshold nothing happens. 
So the Question is does the STM32F429ZIT6 supports overvoltage detection and when is the overvoltage detected, only in case of a overvoltage on VDD or also on AVVD ?
Can the Controller detect a overvoltage if VDD and AVDD are increased at the same time ? 
Thanks in advance. 

Outcomes