English
Language : 

CC2510FX Datasheet, PDF (187/253 Pages) List of Unclassifed Manufacturers – True System-on-Chip with Low Power RF Transceiver and 8051 MCU
CC2510Fx / CC2511Fx
The steps required to perform a flash page
erase from within flash memory are
outlined in Figure 41.
Note that, while executing program code
from within flash memory, when a flash
erase or write operation is initiated,
program execution will resume from the
next instruction when the flash controller
has completed the operation.
; Erase page in flash memory
; Assumes 26 MHz system clock is used
;
CLR EA
;mask interrupts
C1: MOV A,FCTL
;wait until flash controller is ready
JB
ACC.7,C1
MOV FADDRH,#00h
;setup flash address high
MOV FADDRL,#01h
;setup flash address low
MOV FWT,#2Ah
;setup flash timing
MOV FCTL,#01h
;erase page
RET
;continues here when flash is ready
Figure 41: Flash page erase performed from flash memory
13.16.3 Flash Lock Protection
For software protection purposes a set of
lock protection bits can be written once
after each chip erase has been performed.
The lock protect bits can only be written
through the Debug Interface. There are
three kinds of lock protect bits as
described in this section. The flash lock
bits reside at location 0x000 in the Flash
Information page as described in section
12.11.
The LSIZE[2:0] lock protect bits are
used to define a section of the flash
memory which is write protected. The size
of the write protected area can be set by
the LSIZE[2:0] lock protect bits in sizes
of eight steps from 0 to 32 KB. Notice that
the only supported value for LSIZE[2:0]
is 0 and 7 for CC2510F8, CC2511F8,
CC2510F16 and CC2511F16.
The second type of lock protect bits is
BBLOCK, which is used to lock the boot
sector page (page 0 ranging from address
0 to 0x03FF). When BBLOCK is set to 0,
the boot sector page is locked.
The third type of lock protect bit is
DBGLOCK, which is used to disable
hardware debug support through the
Debug Interface. When DBGLOCK is set to
0, all debug commands are disabled.
The lock protect bits are written as a
normal flash write to FWDATA, but the
Debug Interface needs to select the Flash
Information Page first instead of the Flash
Main Page which is the default setting.
The Information Page is selected through
the Debug Configuration which is written
through the Debug Interface only. Refer to
section 12.9 on page 60 for details on how
to select the Flash Information Page using
the Debug Interface.
Table 54 defines the byte containing the
flash lock protection bits. Note that this is
not an SFR register, but instead the byte
stored at location 0x000 in Flash
Information Page.
CC2510Fx/CC2511Fx PRELIMINARY Data Sheet (Rev. 1.2) SWRS055A Page 187 of
252