Solved
Does PVD(Programmable voltage detector) supported in STM32G030K6 controller?
I am using STM32G030K6 controller but it's unable to detect PVD. I would like to know whether it supports PVD or not.
void HAL_MspInit(void)
{
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
PWR_PVDTypeDef sConfigPVD = {0};
__HAL_RCC_SYSCFG_CLK_ENABLE();
__HAL_RCC_PWR_CLK_ENABLE();
/* System interrupt init*/
/* Peripheral interrupt init */
/* PVD_IRQn interrupt configuration */
HAL_NVIC_SetPriority(PVD_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(PVD_IRQn);
/** PVD Configuration
*/
sConfigPVD.Mode = PWR_PVD_MODE_IT_FALLING;
HAL_PWR_ConfigPVD(&sConfigPVD);
/** Enable the PVD Output
*/
HAL_PWR_EnablePVD();
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}