Because I need to maintain some GPIO output states when transitioning from the application to bootloader, I'm jumping back into the bootloader instead of using a software reset to get there (which results in the GPIO tri-stating for ~200ms).
Before I make the jump, I disable interrupts and clear interrupt flags. After the jump, the bootloader starts working through its initialization, but once it gets to INTEnableSystemMultiVectoredInt(), the MCU resets...
I tried overridng _DefaultInterrupt to catch an interrupt that might have been left on by the application for some reason, but this doesn't seem to be working. The MCU just resets and I'm left scratching my head.
Any ideas to what could be causing this? I'm essentially mimicking the behavior of jumping from the bootloader to the application (which works) and so I don't know why it's not working the other way around. Anyone ever able to jump from a PIC32 app to the bootloader without a software reset?