English
Language : 

SH7262 Datasheet, PDF (18/45 Pages) Renesas Technology Corp – High-speed Read/Write Serial Flash Memory
SH7262/SH7264 Group
High-speed Read/Write Serial Flash Memory
Using the Renesas Serial Peripheral Interface
2.4.3 Main Function
The figure below shows the flow chart of the main function in the sample program. The sample program writes data in the
entire memory array, and compares the written value to the read value.
Main function
Initialize the RSPI
Unprotect serial flash memory
Erase the entire memory array
Writing in all
Yes
sectors
completed?
No
Generate one sector write data (64 KB)
• To access serial flash memory, initialize the RSPI as
described in 2.4.1 RSPI Initialization Example.
• Unprotect serial flash memory using the Write Status
Register command (H'01).
• Erase the entire memory array in serial flash memory using
the Chip Erase command (H'C7).
Write one page (256 bytes) data in
serial flash memory
No
Writing one sector
data completed?
Yes
• Execute the Byte/Page Program command (H'02). As the
Byte/Page program command cannot write data more than
the size of one page (256 bytes), continue to execute this
command to write in the entire memory array.
Reading all sectors Yes
completed?
No
Read one sector (64 KB) data from
serial flash memory (note)
Compare the written data value with the
provided data
• Execute the Read Array command (H'0B). As this command
reads the entire memory array continuously, the command
reads data in sectors in this application. Specify the access
width to the Data register (SPDR) in longword.
Verify OK?
Yes
Display an error
No
Protect serial flash memory
Note: When using the DMA transfer, cache coherency must be maintained by software.
This sample program assigns the transfer destination buffer in cache-disabled space.
Figure 15 Main Function Flow Chart
REJ06B0889-0100/Rev.1.00
June 2009
Page 18 of 45