Rev. 1.10
32
October 23, 2020
Rev. 1.10
33
October 23, 2020
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
Page
FARH
FARL[7:5]
FARL[4:0]
0
0000 0000
000
Tag Address
1
0000 0000
001
2
0000 0000
010
3
0000 0000
011
4
0000 0000
100
:
:
:
:
:
:
254
0001 1111
110
255
0001 1111
111
Page Number and Address Selection
Flash Memory
Write Buffer
FD0H
FD0L
CLWB
Flash Memory
FD0H
FD0L
Read data word to FD0H/FD0L
Write page data to FD0L/FD0H
(32 words/page)
FARH/FARL
=FA12~FA0
FARH/FARL
=FA12~FA0
Write buffer addr.
=FA4~FA0
Word m
Page n
Note: “n” is specified by FA12~FA5
Note: “m” is specified by FA12~FA0
Page addr.
=FA12~FA5
11111b
00000b
Flash Memory IAP Read/Write Structure
Write Buffer
The write buffer is used to store the written data temporarily when executing the write operation.
The Write Buffer can be filled with written data after the Flash Memory Erase/Write Function has
been successfully enabled by executing the Flash Memory Erase/Write Function Enable procedure.
The write buffer can be cleared by configuring the CLWB bit in the F
C2 register. The CLWB bit
can be set high to enable the Clear Write Buffer procedure. When the procedure is finished this bit
will be cleared to low by the hardware. It is recommended that the write buffer should be cleared by
setting the CLWB bit high before the write buffer is used for the first time or when the data in the
write buffer is updated.
The write buffer size is
32
words corresponding to a page. The write buffer address is mapped to a
specific flash memory page specified by the memory address bits,
FA12~FA5. The data written into
the FD0L and FD0H registers will be loaded into the write buffer. When data is written into the high
byte data register, FD0H, it will result in the data stored in the high and low byte data registers both
being written into the write buffer. It will also cause the flash memory address to be incremented by
one, after which the new address will be loaded into the FARH and FARL address registers. When
the flash memory address reaches the page boundary, 11111b of a page with
32 words, the address
will now not be incremented but will stop at the last address of the page. At this point a new page
address should be specified for any other erase/write operations.
After a write process is finished, the write buffer will automatically be cleared by the hardware. Note
that the write buffer should be cleared manually by the application program when the data written
into the flash memory is incorrect in the data verification step. The data should again be written into
the write buffer after the write buffer has been cleared when the data is found to be incorrect during
the data verification step.