Watchdog Interrupt then Reset CPU configuration

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

Watchdog Interrupt then Reset CPU configuration

跳至解决方案
1,074 次查看
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 项奖励
回复
1 解答
919 次查看
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 项奖励
回复
1 回复
920 次查看
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 项奖励
回复