cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746GDISCOVERY, PWR_PVD, STM32CubeIDE

ADębs.1
Senior

I want to make an interrupt when power > 2.0V.

STM32CubeIDE generated:

/**
  * @brief NVIC Configuration.
  * @retval None
  */
static void MX_NVIC_Init(void)
{
  /* PVD_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(PVD_IRQn, 8, 0);
  HAL_NVIC_EnableIRQ(PVD_IRQn);
  /* TIM3_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(TIM3_IRQn, 5, 0);
  HAL_NVIC_EnableIRQ(TIM3_IRQn);
  /* LTDC_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(LTDC_IRQn, 5, 0);
  HAL_NVIC_EnableIRQ(LTDC_IRQn);
}
 
/**
  * @brief CRC Initialization Function
  * @param None
  * @retval None
  */

Configuration:

 /* USER CODE BEGIN SysInit */

 PWR_PVDTypeDef sConfigPVD;

  sConfigPVD.PVDLevel = PWR_PVDLEVEL_0;

  sConfigPVD.Mode = PWR_PVD_MODE_IT_RISING;

  HAL_PWR_ConfigPVD(&sConfigPVD);

  HAL_PWR_EnablePVD();

 /* USER CODE END SysInit */

Initialize:

 /* Initialize interrupts */

 MX_NVIC_Init();

How and where to call an interrupt so that it sets the variable on = 0?

Andrzej

0 REPLIES 0