Kinetis KL16 watchdog does not start

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetis KL16 watchdog does not start

525 Views
东伸韩
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 Kudos
1 Reply

328 Views
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 Kudos