Hi,
I am developing code for MC9SG8S08 microcontroller from HCS08 family. I have developed flash routine for burst programming as per reference manual of microcontroller.
While flash burst write is going on and any timer/SPI interrupt request received by CPU, will it generate any error? will be flash write happen successfully? What should be taken care in this scenario.?
The flash region where flash write is going to happen contains no data which will used by ISR.
Thanks in advance.
S08 flash is not readable while it is being programmed. This means you not only have to move part of your flash erase/program code to RAM, but also have to disable interrupts for duration of program/erase operation. You could move some ISRs to RAM, but it's not possible to move interrupt vectors table to RAM.
Regards
Edward
Hi Edward,
Thanks for quick reply. flash program/erase region neither contains ISR code nor the DATA used by ISR. So is it ok to keep Interrupts on? I am using that flash to store some data only.
Thanks and Regards,
Prasad S Udawant
Hi,
Thanks one again.But I still need some clarification.
I am going to write only some bytes of one flash page. Interrupt vector table is located on other flash page. In this scenario also while programming/erasing flash interrupt vectors table will not be readable?
Thanks in advance.
Thanks and regards,
Prasad S Udawant.
Whole flash array/bank gets unreadable while being programmed/erased, not just page you erase program, whole array of pages. Small devices like SG8 have only single flash array. (Some big devices may have 2 big flash arrays. In such devices you could write/erase one array/bank while reading or executing code from another bank.)
Edward