The project implements communication with the on-board OSPI flash on EK-RA6M5 in 2 different modes: SPI mode and Single OPI (SOPI) mode
The QSPI flash chip is Macronix 512 Mb (64 MB) Octal serial flash memory (MX25LM51245G):
https://www.macronix.com/Lists/Datasheet/Attachments/8729/MX25LM51245G, %203V, %20512Mb, %20v1.1.pdf
The FSP module used on this project is r_ospi:
https://renesas.github.io/fsp/group___o_s_p_i.html
The code has the following functionality:
1st part (SPI mode):
1) Reset Octa-Flash
2) Erase sector 1 in SPI mode
3) Write data at 0x70001000 (sector 1)
4) Verify the written data in OSPI during debugging
2nd part(Single OPI mode):
1) Write Configuration Register 2 and enable DQS bit as per section 36.8.3 of RA6M5 hardware manual
2) Write Configuration Register 2 and set dummy cycles to 10 for SOPI (Table 9-3-1 on MX25LM51245G manual)
3) Write Configuration Register 2 and enable SOPI
4) Change protocol from SPI to SOPI on r_ospi
5) Erase sector 2 in OPI mode
6) Write data at 0x70002000 (sector 2)
7) Verify the written data in OSPI during debugging
STEPS to run the project:
1) Import the attached project into e2studio workspace.
2) Build and debug (download) the project on e2studio




Comments