Re:SWR (software reset) on a PIC24FJ256GB206 device
2013/01/03 01:29:00
(permalink)
Thanks, I was wondering about the "Many registers" statement, because it is so vague....
Now I have come across another piece of code that also confuses me a bit:
When the AN1157 boot loader activates the main application, it does so by jumping to it via the application reset vector in the jump table.
But that surely will not change any registers as would a reset.
So now my concern is if the application will really be properly initialized?
Sure, it will run through all the coded initializations as well as the C subsystem startup, but can one be sure that it will behave the same as if it was not started from a boot loader?
And follow-up to that would be that I could activate the boot loader from within my code using the same type of jump method the boot loader uses to activate the application. That would in fact mean that all hardware settings would be intact when the boot loader starts running this way as opposed to through a power on reset.
But I have to prepare for the jump by at least disabling all interrupts first (I have a lot of these) because the ISR vector targets will soon be erased. The boot loader uses UART1 in a polled way, no interrupts used.
Need to think through this again.