R01UH0823EJ0100 Rev.1.00
Page 1722 of 1823
Jul 31, 2019
RX23W Group
50. Flash Memory (FLASH)
50.10.8.2
Program
This command is used to program the specified data to the user area or data area. Set the lower 8 bits to 0 for the program
address selected in this command. When the data length is shorter than 256 bytes, the data cannot be programmed. Fill
the gaps with FFh.
When the program from the selected address is successfully completed, the MCU sends a response (06h). If the SUM of
the received command does not match or an error occurs during a program operation, the MCU sends an error response.
To enter the program/erase host command wait state after the program operation ends, send 50h FFh FFh FFh FFh B4h
from the host. The MCU sends a response (06h), and enters the program/erase host command wait state.
Program address (4 bytes): Address for program destination
Set the lower 8 bits to 0
Set FFFF FFFFh for end of program
Program data (n bytes): Program data (n = 256, 0 for end of program)
When the program data is less than n bytes, set FFh for the missing data.
No program data for the end of program
SUM (1 byte): Value that is calculated so the sum of command data is 00h
Error (1 byte): Error code
11h: SUM error
2Ah: Address error (the address is not in the selected area.)
53h: Program error (the data cannot be programmed.)
Command
50h
Program address
Program data
SUM
Response
06h
Error response
D0h
Error