1.0的SDK找不到看門狗,找了舊的806 SDK有看到初始化,但是怎麼喂狗
int main(void)
{
SystemClock_Config(CPU_CLK_160M);
printf("enter main\r\n");
WDG_Init();
while (1)
{
printf(".");
HAL_Delay(1000);
}
}
static void WDG_Init(void)
{
hwdg.Instance = WDG;
hwdg.Init.Reload = 5 * 1000 * 1000; // 5s
if (HAL_WDG_Init(&hwdg) != HAL_OK)
{
Error_Handler();
}
}