STM32H5: PVD interrupt not triggered
I am using STM32H573 and I have tried to enable PVD some what like this:
void PVD_Init()
{
PWR_PVDTypeDef pvdconfig;
HAL_NVIC_SetPriority(PVD_AVD_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(PVD_AVD_IRQn);
pvdconfig.Mode = PWR_PVD_MODE_IT_RISING_FALLING;
pvdconfig.PVDLevel = PWR_PVDLEVEL_7;
HAL_PWR_ConfigPVD(&pvdconfig);
HAL_PWR_EnablePVD();
}
void HAL_PWR_PVDCallback()
{
// HAL_GPIO_WritePin(GPIOC, LED_1_Pin, GPIO_PIN_SET);
printf("\rBefore RESET COUNT: %.2f\n", counter);
EEPROM_Write_NUM(0, 0, counter);
}Someone might say to enable the clock but for this module I don't think we need to manually enable the clock. I have looked into it and am pretty sure about it. If anyone else have some other theories please let me know. Also made sure that EXTI 16 is connected internally.
