Dear Renesas team,we are using an RA6M3 in our prototype with a 20 MHz crystal connected to XTAL and EXTAL. I noticed that the write speed to the QSPI flash memory is negatively affected if the XTAL speed is set from 24 MHz to 20 MHz under tab “Clocks” in the configurator in e2Studio. The same flash chip is used on our board as it is utilized on EK-RA6M3, the MX25L25645G. As PCLKA, which is responsible for the QSPI interface, is configured to 120 MHz in both cases, there should be no drawback in write performance. It is also interesting to note that the reading speed is not affected in either case.As I found out, this effect can also be simulated with the EK-RA6M3 (which is known to use a 24 MHz crystal). For this reason, I have included a sample project based on Renesas' FileX sample project for the EK-RA6M3 (FSP version 5.5.0) which can be run on this evaluation board. Two functionalities are provided: 1) flash memory can be erased entirely and 2) write 0 to all flash memory bits.
QSPI_Flash_Write_Time_Deviation_RA6M3.zipThe logged time for erase / write and read is comparable for our prototype with a 20 MHz crystal. It can be reproducibly observed that a 20% reduction in erase / write speed occurs as soon as the XTAL value is changed from 24 MHz to 20 MHz.
24 MHz XTAL setting:Console output on J-Link RTT Viewer:INFO : Erase verification time of QSPI flash memory: 100940 msINFO : Erasing QSPI Flash device successfulINFO : Erase verification time: 2520 msINFO : Writing zero pattern to QSPI flash.INFO : QSPI flash write time: 30070 msINFO : Zero pattern verification time: 2520 ms
20 MHz XTAL setting:Console output on J-Link RTT Viewer:INFO : Erase verification time of QSPI flash memory: 126840 msINFO : Erasing QSPI Flash device successfulINFO : Erase verification time: 2520 msINFO : Writing zero pattern to QSPI flash.INFO : QSPI flash write time: 35520 msINFO : Zero pattern verification time: 2520 msI'm a bit puzzled why this behavior can be provoked with different XTAL frequency settings. Even with a 20 MHz crystal, if the PCLKA frequency remains the same (120 MHz), one should be able to observe roughly the same erase/write speed. But more importantly, what is the solution to the problem? I don't suppose it is correct to leave the frequency setting at 24 MHz in the configurator when actually using a 20 MHz crystal?Thanks in advance!