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();
}
}