I found the solution hidden in Reference Manual that I had to register and download from ARM.com. Read the comments ....here is the entire code to replace in the wacthdog.c file in the FSLMQX/mqx/examples/watchdog example:
void handle_watchdog_expiry
(
pointer td_ptr
)
{
#if 1 //DES 1=test,0=default
unsigned int temp_AIRCR=0;
//DES VCORTEX_SCB_STRUCT_PTR scb = (VCORTEX_SCB_STRUCT_PTR)&(((CORTEX_SCB_STRUCT_PTR)CORTEX_PRI_PERIPH_IN_BASE)->AIRCR);
VCORTEX_SCB_STRUCT_PTR scb = (VCORTEX_SCB_STRUCT_PTR)&(((CORTEX_SCS_STRUCT_PTR)CORTEX_PRI_PERIPH_IN_BASE)->SCB);
temp_AIRCR = (unsigned int)scb->AIRCR; //Read AIRCR register
printf("\n\rREAD AIRCR Register : 0x%08P", temp_AIRCR); //print what was read from AIRCR
temp_AIRCR &= 0x0000ffff; //DES mask of the top 16-bits
temp_AIRCR |= 0x05Fa0000; //DES When writing to AIRCR the update 16-bit must be "0x05FA" per ARMv7-M Architecture Reference Manual (must register on ARM.com to get)
temp_AIRCR |= SCB_AIRCR_SYSRESETREQ_MASK; //DES set the SYSRESETREQ bit to generate software reset
printf("\n\rWRITE AIRCR Register : 0x%08P", temp_AIRCR); //print what will be written to AIRCR
// Reboot...
scb->AIRCR = temp_AIRCR;
for(;
{}
#endif
printf("\nWatchdog expired for task: 0x%P", td_ptr);
_mqx_exit(1);
}
Regards,
David