STM32F4 HAL: Undefined Reference to HAL_WWDT_Start();
I want to implement the watchdog timer in my app. I generated the project code using STM32CubeMX.
I’m calling MX_WWDG_Init();
which contains...
static void MX_WWDG_Init(void)
{
hwwdg.Instance = WWDG;
hwwdg.Init.Prescaler = WWDG_PRESCALER_1;
hwwdg.Init.Window = 64;
hwwdg.Init.Counter = 64;
hwwdg.Init.EWIMode = WWDG_EWI_DISABLE;
if (HAL_WWDG_Init(&hwwdg) != HAL_OK)
{
Error_Handler();
}
When I call MX_WWDG_Init(void), my app doesnt run. When I comment it out, all is well. This led me to believe that perhaps calling HAL_WWDG_Init automatically started the WDT and it was timing out, so I tried calling HAL_WWDG_Refresh(&wwdg)in my main while()loop with no luck.I then tried calling HAL_WWDG_Start(&hwwdg) at the start of my code and got the “Undefinced Reference” error upon compling. Looking into stm32f4xx_hal_wwdg,c, I can see that HAL_WWDG_Start() and HAL_WWDG_Start_IT() are not defined. I found an earlier version of this file online in which both of these function ARE defined. Mine is version 1.5.2 and I think the older version is 1.4.something. Are these functions defined elsewhere? Thanks!