2021-03-11 19:09:05 +08:00
|
|
|
/*
|
|
|
|
* @Description:
|
|
|
|
* @Date: 2021-03-09 18:19:26
|
|
|
|
* @LastEditors: CK.Zh
|
|
|
|
* @LastEditTime: 2021-03-10 15:07:01
|
|
|
|
* @FilePath: \NaviKit_EC_stm32\App\Src\th_demo.c
|
|
|
|
*/
|
|
|
|
#define LOG_TAG "TH-IWDG"
|
|
|
|
|
|
|
|
#include <th_iwdg.h>
|
|
|
|
#include "main.h"
|
|
|
|
#include "iwdg.h"
|
|
|
|
|
|
|
|
|
|
|
|
const osThreadAttr_t IWDGTask_attributes = {
|
|
|
|
.name = "IWDGTask",
|
|
|
|
.priority = (osPriority_t) osPriorityHigh,
|
2021-03-12 13:38:28 +08:00
|
|
|
.stack_size = 128 * 8
|
2021-03-11 19:09:05 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
void StartIWDGTask(void *argument){
|
2021-03-12 13:38:28 +08:00
|
|
|
log_d("Start IWDG Task");
|
2021-03-11 19:09:05 +08:00
|
|
|
for(;;){
|
|
|
|
HAL_IWDG_Refresh(&hiwdg);
|
2021-03-12 13:38:28 +08:00
|
|
|
log_v("IWDG Counter Refreshed");
|
2021-03-11 19:09:05 +08:00
|
|
|
osDelay(1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|