![Texas Instruments CC2533 User Manual Download Page 78](http://html.mh-extra.com/html/texas-instruments/cc2533/cc2533_user-manual_1094592078.webp)
Set up DMA channel:
SRCADDR=<XDATA location>
DESTADDRR=FWDATA
VLEN=0
LEN=<block size>
WORDSIZE=byte
TMODE=single mode
TRIG=FLASH
SRCINC=1 byte
DESTINC=0 bytes
IRQMASK=yes
M8=0
PRIORITY=high
Arm DMA Channel
Start flash write
Set up flash address
F0031-01
Flash Page Erase
Figure 6-1. Flash Write Using DMA
6.2.4 CPU Flash Write
To write to the flash using the CPU, a program executing from SRAM must implement the steps outlined
in the procedure described in
. Disable interrupts to ensure the operation does not time out.
6.3
Flash Page Erase
The flash page-erase operation sets all bits in the page to 1.
A page erase is initiated by setting
FCTL.ERASE
to 1. The page addressed by
FADDRH[7:1]
(CC2530/CC2531/CC2540/CC2541) or
FADDRH[6:0]
(CC2533) is erased when a page erase is initiated
. Note that if a page erase is initiated simultaneously with a page write, i.e.,
FCTL.WRITE
is set to 1, the
page erase is performed before the page-write operation starts. The
FCTL.BUSY
bit can be polled to see
when the page erase has completed.
Power mode 1, 2, or 3 must not be entered while erasing a page. Also, the system clock source
(XOSC/RCOSC) must not be changed while erasing.
NOTE:
If a flash page-erase operation is performed from within flash memory and the Watchdog
Timer is enabled, a Watchdog Timer interval must be selected that is longer than 20 ms, the
duration of the flash page-erase operation, so that the CPU can clear the Watchdog Timer.
78
Flash Controller
SWRU191C
–
April 2009
–
Revised January 2012
Copyright
©
2009
–
2012, Texas Instruments Incorporated