Protected memory - Bootloader for MC9S08JM32

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Protected memory - Bootloader for MC9S08JM32

694 Views
leesp
Contributor I

I have a MC9S08JM board which already has code programmed into it - the code includes bootloader and user application program. The program memory section 0XF6FF - 0XFFFF is protected (using the NVPROT/FPROT registers) - this is where the bootloader resides.

Now, I want to change the user application program (which is located in program memory other than the protected area). I have a VC++ program which will download a *.hex file into the MC9S08JM32 throught USB cable (the bootloader code uses USB). The VC++ doesn't care (it doesn't know either) that there is a protected area in the MC9S08.

What happens if the VC++ attempts to flash the entire program memory, including the protected memory?

Labels (1)
0 Kudos
1 Reply

204 Views
kef
Specialist I

Attempts to program / erase protected flash should fail. Will bootloader continue flashing unprotected areas or not depends on how bootloader is made. Bootloader may stop on first failure, or it may ignore errors and continue receiving further commands. It may compare desired flash contents with resulting flash contents, or not. It may clear FSTAT error bits once per download process (which will make all further flash command ignored until FSTAT errors are cleared), or clear FSTAT before each flash command.

0 Kudos