We were previously working on K60M512Z chip and the following code worked perfect for reseting the device programatically:
VCORTEX_SCB_STRUCT_PTR scb = (VCORTEX_SCB_STRUCT_PTR)&(((CORTEX_SCS_STRUCT_PTR)CORTEX_PRI_PERIPH_IN_BASE)->SCB);
temp_AIRCR = (UINT)scb->AIRCR; //Read AIRCR register
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
scb->AIRCR = temp_AIRCR;
however im testing the same code with K64 chip (MK64FN1M0VLQ12) and its not causing the reset anymore.
Both setups are using MQX 4.1.0
Can anyone shed any light on whats wrong?
thank you in advance