I have bug that we cannot replicate that occurs around once every 15 million operational hours. We cannot reproduce this state on the bench. The only thing I know is that once the hardware gets in this "state" it continually reboots every 3 seconds, so, I believe its the Backup watchdog timer firing (one of the first things I turn on) as that is programmed to fire at 3.3 seconds. Also every 120 seconds an external watchdog holds reset low for 100mS if software is not running correctly, neither recover the processor back to normal running. The only way to recover is to remove power for a second and put it back on.
Anyway, questions is, how do I clear all pending interrupts? I have read the reference manual and its a little confusing how the interrupts work. My understanding is the processor powers up with global interrupts disabled and MQX enables them at some point during runtime. My concern is some interrupt ends up firing that is not handled (I do have an unhanded interrupt that requests reset which could also possibly be the reset cause) Anyway, can I manually clear all interrupts before MQX boots? I do disable all the debug pins already.
The plan is to configure all the IO to a known state, clear pending interrupts, then start the BSB init code for MQX. Any other suggestions?