SectorEraseFlash Method
UP ]

 

Description

This method is used to erase one target’s on-chip flash sector (512 bytes or 256 words).

Syntax

HCS121.SectorEraseFlash (Address)

Part Type Description
Address Long Target’s on-chip flash memory address of the sector to be erased. The nine less significant bits of the address are not used.
 

Remarks

You have to modify the registers PPAGE and FCNFG in order to select the right flash page and flash block number of the sector respectively. You do not need to modify PPAGE in case of erasing a sector whose address belong to the ranges [$4000-$7FFF] or [$C000-FFFF], but still have to write FCNFG selecting the flash block number 0 (field BKSEL).

See also:

EraseVerifyFlash method .

MassEraseFlash

 

If you have a question or suggestion please contact me. Updated: 03.27.2003
Copyright (c) 2003-2004 J.Gorgas. All rights reserved. All trademarks mentioned are the property of their respective owners.