RT1064 WDOG IRQ

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

RT1064 WDOG IRQ

1,223 Views
leroynash
Contributor I

I am attempting to implement a watchdog (WDOG1) on my custom iMX RT1064 board with FreeRTOS.  Im am using the fsl_wdog.c driver.   All appears to work withthe exception of the IRQ, which I do not see. I attempted a brakpoint but assumed I had timing issues with the reset.  I attempt to update a counter in flash, but it never changes. The interruptTimeValue I am using should give plenty of time to complete the write.  Any ideas?

Thansk Leroy

 

#define WDOG_BASE WDOG1
#define WDOG_IRQHandler WDOG1_IRQHandler

void WDOG_IRQHandler(void)
{
WDOG_ClearInterruptStatus(WDOG_BASE, kWDOG_InterruptFlag);
++g_wdogs;
save_wdog_resets(g_wdogs);
/* User code. User can do urgent case before timeout reset.
* IE. user can backup the ram data or ram log to flash.
* the period is set by config.interruptTimeValue, user need to
* check the period between interrupt and timeout.
*/
}

WDOG_GetDefaultConfig(&config);
config.timeoutValue = 0x7FU;
config.enableInterrupt = true;
config.interruptTimeValue = 0x44U;
WDOG_Init(WDOG_BASE, &config);

0 Kudos
Reply
5 Replies

1,182 Views
leroynash
Contributor I

For the moment I have moved on from trying to get the interrupt to work and am using the status flag to record that watchdog had tripped.

0 Kudos
Reply

1,219 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @leroynash ,

There is a wdog demo in SDK, it can use WDOG1 to generate interrupt. Can you refer to it?

 

Regards,

Jing

0 Kudos
Reply

1,216 Views
leroynash
Contributor I

My original code was based on the demo

 

Thanks

0 Kudos
Reply

1,210 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @leroynash ,

I tested this code. It can jump into interrupt. If in freertos it can't, could it because RTOS disable it?

 

Regards,

Jing

0 Kudos
Reply

1,180 Views
leroynash
Contributor I

For the moment I have moved on from trying to get the interrupt to work and am using the status flag to record that a timeout occurred. I may get back to it when the schedule permits.

Regards,

Leroy.

0 Kudos
Reply