Hello,
It should be feasible to program the byte value to flash within the ISR code. Of course, the code that controls the programming process will actually be running from RAM (probably the stack).
After programming is complete, I guess there are a couple of possibilities -
- Enter a wait loop within the ISR, and rely on the COP timer to initiate a reset.
- Execute an illegal opcode within the ISR to immediately initiate a reset.
One thing you may have to guard against is the occurrence of multiple LVD interrupts should reset initialisation occur more than once for the same power event. Ideally, the LVD should interrupt the first time, and hold a reset condition the second time. The problem will be detecting which is first and second time.
Regards,
Mac