I'm working on a project with an i.MX RT1020 EVK using NXP's SDK and FreeRTOS. I'm encountering some strange behaviour with interrupts.
- After first programming the board, the interrupts (attached to push buttons) work fine (lets say the up, down, left, right buttons)
- After some while, a few of the interrupts stop working (only up button works)
- Even after multiple resets and even after removing the power and reconnecting, these interrupts do not work
- Even after reprogramming the board, the interrupts do not work, HOWEVER
- The interrupts work again if I program the board with a different firmware and reprogram back to the original.
It's a very strange problem. Perhaps some sort of non-volatile memory is being corrupted. Perhaps the IVT? (but shouldn't that be fixed by reprogramming?)
Any help would be appreciated.
The relevant code for setting up my interrupts is listed below. Note, I have this set up for all the buttons, with four interrupt handlers, but I'm only showing one below.
EDIT: I'm not sure how to post code in this forum without messing up the formatting, so I'll attach the file that contains the fragment.
EDIT 2: Added full_interrupt_code.zip, see my comment below