Kinetis KL16 watchdog does not start

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Kinetis KL16 watchdog does not start

658 次查看
东伸韩
Contributor I

Written using SDKV2.2, in accordance with the API manual prepared by the initialization watchdog code, the main program to join the feed dog code, add a long delay before feeding the dog ,feed dog code jump over did not actually restart, The clock is also set in LPO mode.

 


void WDOG_Init(void)
{
cop_config_t config;
COP_GetDefaultConfig(&config);
config.timeoutCycles = kCOP_2Power8CyclesOr2Power16Cycles;
COP_Init(SIM,&config);

}

 

 

 

int main(void) {
/* Init board hardware. */
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitDebugConsole();
WDOG_Init();

COP_Refresh(SIM);
GPIO_WritePinOutput(BOARD_INITPINS_LED1_GPIO,BOARD_INITPINS_LED1_GPIO_PIN ,1);
delay_ms(2000);

COP_Refresh(SIM);

GPIO_WritePinOutput(BOARD_INITPINS_LED1_GPIO,BOARD_INITPINS_LED1_GPIO_PIN ,0);
delay_ms(1500);
COP_Refresh(SIM);

/* Add your code here */

// for(;;) { /* Infinite loop to avoid leaving the main function */
// __asm("NOP"); /* something to use as a breakpoint stop while looping */
// }
}

0 项奖励
回复
1 回复

461 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Can not extract your project.

Have you test the cop in SDK_2.2_MKL16Z128xxx4? Just add the long delay before feed the dog.

Whether the chip be reset?

C:\SDK_2.2_MKL16Z128xxx4\boards\frdmkl26z\driver_examples\cop

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复