Watch dog not refreshing when using KSDK 1.0

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

Watch dog not refreshing when using KSDK 1.0

683 Views
jamespieterick
Contributor IV

Hi everyone,

 

I am having a problem with the watch dog on my K24 project. It keeps resetting even though I am sure that I am calling WDOG_DRV_Refresh() every 10 milliseconds or less. It resets at its overflow time each time. I have tried 5, 10 and 100 second overflow times.

 

I am passing the following configuration structure to the wdog initialization function:

 

const wdog_user_config_t wdogInit =

{

  .timeoutValue = 5120U,  /* Watchdog overflow time is about 5s */

  .windowValue = 0U,  /* Watchdog window value, 0--disable window function */

  .clockPrescalerValue = kWdogClockPrescalerValueDevide1, /* Watchdog clock prescaler */

  .updateRegisterEnable = true, /* Update register enabled */

  .clockSource = kWdogClockSourceLpoClock, /* Watchdog clock source is LPO 1KHz */

  .workInWaitModeEnable = true, /* Enable watchdog in wait mode */

.workInStopModeEnable = true, /* Enable watchdog in stop mode */

  .workInDebugModeEnable = false, /* Disable watchdog in debug mode */

};

 

I am working in KDS version 1.1.1 and KSDK 1.0. I have tried using processor expert to setup the timer as well as attempting to use the example in the wdog demo code.

 

Do you have any ideas as to what might be wrong?

 

Thanks.

Labels (1)
0 Kudos
3 Replies

369 Views
DavidS
NXP Employee
NXP Employee

Hi James,

I would highly recommend upgrading to latest KDS_3.0 and KSDK_1.2.0.

Re-test and if possible post project.

Which K24?

Are you using a Tower board (twrk24f120m)? Or your own?

The updated KSDK has example of using wdog:

C:\Freescale\KSDK_1.2.0\examples\twrk24f120m\driver_examples\wdog\kds

Regards,

David

0 Kudos

369 Views
jamespieterick
Contributor IV

Hi David,

We are using the MK24FN1M0VLQ12. This processor is being used in a

ultrasound system control panel. We are actually toward the end of our

project. I had avoided turning on the watch dog until now because of

concern about the watch dog masking problems in the code during testing

and validation.

One concern that I have about replacing the SDK with a new version is that

I had to replace the usb folder in the SDK with an upgraded version so

that I could get a USB composite device working. Will anything like that

need to be done with KSDK_1.2.0?

Are there any incompatibilities between any of the SDK function calls

between 1.0 and 1.2.0?

Let me know what you think.

Thanks,

Jim Pieterick

Grayhill Inc.

708.482.2188

0 Kudos

369 Views
DavidS
NXP Employee
NXP Employee

Hi Jim,

If at end of product development I would not recommend upgrading.  There are many changes but the changes also have improvements too.  More examples for one, simpler opening of projects, etc...

I did test the WDOG example for FRDM-K64F Freedom board using latest tool chain successfully.  The K64F is close relative of MK24FN1M0VLQ12.

It might be worth downloading and using it to compare to what you have.  I'm guessing it would be a minor tweak in the end.

Regards,

David

0 Kudos