Rev. 1.10
38
October 23, 2020
Rev. 1.10
39
October 23, 2020
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
Flash Memory Erase/Write Function Enable Procedure
The Flash Memory Erase/Write Function Enable Mode is specially designed to prevent the flash
memory contents from being wrongly modified. In order to allow users to change the Flash memory
data using the IAP control registers, users must first enable the Flash memory Erase/Write function.
Flash Memory Erase/Write Function Enable Procedure Description
1. Write data “110” to the FMOD[2:0] bits in the FC0 register to select the Flash Memory Erase/
Write Function Enable Mode.
2. Set the FWPEN bit in the FC0 register to “1” to activate the Flash Memory Erase/Write
Enable
Function. This will also activate an internal timer.
3. Write the correct data pattern into the Flash data registers, FD1L~FD3L and FD1H~FD3H, as
soon as possible after the FWPEN bit is set high. The enable Flash memory erase/write function
data pattern is 00H, 0DH, C3H, 04H, 09H and 40H corresponding to the FD1L~FD3L and
FD1H~FD3H registers respectively.
4. Once the timer has timed out, the FWPEN bit will automatically be cleared to zero by hardware
regardless of the input data pattern.
5.If the written data pattern is incorrect, the Flash memory erase/write function will not be enabled
successfully and the above steps should be repeated. If the written data pattern is correct, the
Flash memory erase/write function will be enabled successfully.
6. Once the Flash memory erase/write function is enabled, the Flash memory contents can be
updated by executing the page erase and write operations using the IAP control registers.
To disable the Flash memory erase/write function, the CFWEN bit in the FC0 register can be
cleared. There is no need to execute the above procedure.