Rev. 1.10
42
October 23, 2020
Rev. 1.10
43
October 23, 2020
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
Flash Memory Non-Consecutive Write Description
The main difference between Flash Memory Consecutive and Non-Consecutive Write operations
is whether the data words to be written are located in consecutive addresses or not. If the data to be
written is not located in consecutive addresses the desired address should be re-assigned after a data
word is successfully written into the Flash Memory.
A two data word non-consecutive write operation is taken as an example here and described as
follows:
1. Activate the “Flash Memory Erase/Write function enable procedure”. Check the CFWEN bit
value and then execute the erase/write operation if the CFWEN bit is set high. Refer to the “Flash
Memory Erase/Write function enable procedure” for more details.
2. Set the FMOD field to “001” to select the erase operation and set the CLWB bit high to clear the
write buffer. Set the FWT bit high to erase the desired page which is specified by the FARH and
FARL registers and has been tagged address. Wait until the FWT bit goes low.
3. Execute a Blank Check operation using the table read instruction to ensure that the erase operation
has successfully completed.
Go to step 2 if the erase operation is not successful.
Go to step 4 if the erase operation is successful.
4. Set the FMOD field to “000” to select the write operation.
5. Setup the desired address ADDR1 in the FARH and FARL registers. Write the desired data word
DATA1 first into the FD0L register and then into the FD0H register.
6. Set the FWT bit high to transfer the data word from the write buffer to the flash memory. Wait
until the FWT bit goes low.
7. Verify the data using the table read instruction to ensure that the write operation has successfully
completed.
If the write operation has not successfully completed, set the CLWB bit high to clear the write
buffer and then go to step 5.
Go to step 8 if the write operation is successful.
8. Setup the desired address ADDR2 in the FARH and FARL registers. Write the desired data word
DATA2 first into the FD0L register and then into the FD0H register.
9. Set the FWT bit high to transfer the data word from the write buffer to the flash memory. Wait
until the FWT bit goes low.
10. Verify the data using the table read instruction to ensure that the write operation has successfully
completed.
If the write operation has not successfully completed, set the CLWB bit high to clear the write
buffer and then go to step 8.
Go to step 11 if the write operation is successful.
11. Clear the CFWEN bit low to disable the Flash memory erase/write function.