Hello,
I have implemented a bootloader on dsPIC33E (dsPIC33EP512GM604) in line with the Microchip application notes AN1157 for remapping of interrupt vectors from boot to OFP using a jump table (AN1157 option B). Everything works as expected and I am able to update my main application over CAN.
However, I am not quite sure what to do with the non-maskable interrupts (oscillator, stack, DMAC, exceptions etc.). When the main application is not present there is nothing to jump to, so could potentially try and execute garbage. I have ensured that the jump table area is filled with zeros (stop) initially (i.e. after boot has been flashed), but this doesn't protect for partial updates where the main application has been erased.
Any advice on what to do with those interrupts? Maintain them in the bootloader? Map them to a common area which could be updated (doesn't help with partial erase)?
Thanks
MS