AnsweredAssumed Answered

HCS08 and flash access (writing, erasing, protection...)

Question asked by vcz on Oct 9, 2009
Latest reply on Oct 20, 2009 by vcz

Hello all.

 

I'm working on a mc9s08aw16 HCS08 based MCU.

 

I have to program a bootloader and a firmware.

I choose to place the firmware between 0xC000 and 0xEEEE and the bootloader between 0xF000 and 0xFFAF.

I have made a small function which transfert to RAM the code used to write/erase flash

 

But I still not succed in erasing and writing to flash

 

I program the 0xFFBF byte (NVOPT) with 0xFE so the MCU should be unsecured (programming via Cyclone Pro)

 

I'm lost between all the register related to flash.

More precisly with the NVBACKEY registers, KEYACC bit, SEC0 bits...

 

To sum up, is there anybody who can explain me what I have to do with those register to succeed in my goal.

 

Thanks a lot

Outcomes