We're using the RT1021 MCU and our application needs to keep a timer interrupt running even while programming the flash chip. I moved my interrupt handlers into RAM and even the drivers just to try and avoid bus errors. I'm getting exceptions when I get PIT timer interrupts anyway. Why would these be occurring with interrupt handlers in RAM? The handlers don't execute code in the flash chip. Does it make sense that I would have to disable ALL interrupts in order to erase or program the flexspi nor chip? Is there some lower level code being linked in for interrupts? Could it come down to the NVIC not being in RAM?
Also, probably unrelated, the debugger shows ReprogramSector in the call stack but gives the line number for the Test_Flash routine and displays that code. I thought maybe the stack was getting clobbered, but it looks like a debugger error. The offset in the map file indicates ReprogramSector is at that address.
Thanks in advance for any insight,