Hi, I've using a microcontroller to debug the HCS08 through its BKGD PIN. I have this doubt that shouldn't it be possible to erase the FLASH memory via BDC commands iself? I seem to find no BDC command that can do that. Please help? Thanks  :)

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

Hi, I've using a microcontroller to debug the HCS08 through its BKGD PIN. I have this doubt that shouldn't it be possible to erase the FLASH memory via BDC commands iself? I seem to find no BDC command that can do that. Please help? Thanks  :)

625 Views
aruraghuwanshi
Contributor I

The S08 manual doesn't seem to contain any BDC command to erase the flash. Every time I need to write something through the BKGD pin onto the S08, I need to erase the flash through the BDM port. I believe if the BDC protocol can exist independently, it should also able to erase the FLASH via a command sequence too right?

Any help would be grateful

Labels (1)
0 Kudos
2 Replies

439 Views
mfugere
Contributor III

The datasheet for the HCS08 controllers has the information and sequence spelled out in the FLASH memory section of the document (for example, reference MC9S08AC60 datasheet Page 52).   To write those registers and flash memory locations using Background Debug Mode connection, reference AN3335 document that explains the commands available, which will have read and write commands to use with the appropriate flash controller reg addresses to erase the flash blocks.  Depending on your device, you may have to erase multiple blocks separately, I think.

0 Kudos

439 Views
aruraghuwanshi
Contributor I

Hi, Thanks a lot! That actually helped. I'll go ahead with the sequence now. Hope it works

0 Kudos