kl26 看门狗不起作用

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

kl26 看门狗不起作用

961 Views
bishihao
Contributor II

今天用KSDK2.0测试看门狗定时器,断点查看看门狗定时器不起作用,在while中调用COP_DRV_IsRunning(0),返回0,大侠给指点一下。

#include "board.h"

#include "fsl_cop_driver.h"

 

 

int main(void)

{

    cop_config_t user_cop;

   

    hardware_init();

    config_peripheral();

   

    user_cop.copClockSource = kCopLpoClock;

    user_cop.copTimeout = kCopTimeout_short_2to10_or_long_2to18;

    user_cop.copWindowModeEnable = false;

   

    COP_DRV_Init(0,&user_cop);

    while(1);

}

Labels (1)
1 Reply

796 Views
ivadorazinova
NXP Employee
NXP Employee

Hello bi shihao,

Please, you probably mean KSDK 1.2, right ?

Have you tried demo for COP for KL-26Z? the demo is located at c:\Freescale\KSDK_1.2.0\examples\frdmkl26z\driver_examples\cop\

when running this example, to enable COP you must change definition DISABLE_WDOG into 0 in file system_MKLxxxx.h

I hope this helps.

Regards!

Iva