Watchdog Interrupt then Reset CPU configuration

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

Watchdog Interrupt then Reset CPU configuration

Jump to solution
746 Views
gschelotto
Contributor V

Hi,

I'm not able to configure the Watchdog using PE on MKE02Z in order to interrupt and then Reset the CPU as shown:

Untitled.png

After PE code generation INT_WDOG_EWM is not listed in vector table nor at Events.c.Before a WDG reset is performed I need to save some variables in a non volatile memory. How can I do this?

regards,

gaston

0 Kudos
Reply
1 Solution
591 Views
isaacavila
NXP Employee
NXP Employee

Hello,

Once you select the Wdog component, you must go to Events tab and select "generate code" on OnWatchDog option in order to create the ISR entry that will be called once watchdog timeout occurs:

Events tab.jpg

Generate code.jpg

Then Save changes, generate code and ISR should appear on event.c file:

/*

** ===================================================================

**     Event       :  WDog1_OnWatchDog (module Events)

**

**     Component   :  WDog1 [WatchDog_LDD]

*/

/*!

**     @brief

**         Called if watchdog time-out occurs. WatchDog must support

**         this feature and must be enabled.

**     @param

**         UserDataPtr     - Pointer to the user or

**                           RTOS specific data. The pointer passed as

**                           the parameter of Init method.

*/

/* ===================================================================*/

void WDog1_OnWatchDog(LDD_TUserData *UserDataPtr)

{

  /* Write your code here ... */

}

Hope this helps!

Regards,

Isaac

View solution in original post

0 Kudos
Reply
1 Reply
592 Views
isaacavila
NXP Employee
NXP Employee

Hello,

Once you select the Wdog component, you must go to Events tab and select "generate code" on OnWatchDog option in order to create the ISR entry that will be called once watchdog timeout occurs:

Events tab.jpg

Generate code.jpg

Then Save changes, generate code and ISR should appear on event.c file:

/*

** ===================================================================

**     Event       :  WDog1_OnWatchDog (module Events)

**

**     Component   :  WDog1 [WatchDog_LDD]

*/

/*!

**     @brief

**         Called if watchdog time-out occurs. WatchDog must support

**         this feature and must be enabled.

**     @param

**         UserDataPtr     - Pointer to the user or

**                           RTOS specific data. The pointer passed as

**                           the parameter of Init method.

*/

/* ===================================================================*/

void WDog1_OnWatchDog(LDD_TUserData *UserDataPtr)

{

  /* Write your code here ... */

}

Hope this helps!

Regards,

Isaac

0 Kudos
Reply