We are using a custom board which uses the MIMXRT1064CVL5B part and extensively use HyperFlash attached to FlexSPI bus. We noticed that in general, the updated SDK 2.9 HyperFlash driver is far less stable than SDK 2.7 HyperFlash driver. Specifically, we noticed some HyperFlash read errors after a variable amount of time with SDK 2.9.
One issue we noticed was that the function flexspi_get_frequency() in flexspi_hyper_flash_ops.h uses the USB PLL PFD0 to calculate flexspi frequency, when the actual FlexSPI root clock is System PLL PFD2. Fixing this improves the stability and read errors are seen later, but the most improvement comes from not changing the value of deviceconfig.flexspiRootClk after initializing the hyperflash. This update to deviceconfig.flexspiRootClk every time we call page program is only in SDK 2.9.
The questions are as follows:
1.Is there a specific reason to update the deviceconfig.flexspirootclk and the DLL everytime for read and write? Is it related to calibration over frequency?
2.What would be the ideal way to improve long-term stability of HyperFlash reads with SDK 2.9?
Let us know if you need more information or source files.
Thanks,
Niranjan Gopal
Hello,
Thanks for catching the bug within the function flexspi_get_frequency. I already reported this to the SDK team.
Is there a specific reason to update the deviceconfig.flexspirootclk and the DLL everytime for read and write? Is it related to calibration over frequency?
As for the clock change, before write and revert it after done, this is needed because the max clock for flash write is lower than the max clock for flash read required by flash itself. To make sure the writing success, the clock of write cannot be too high, in another word, the correction takes precedence over the speed. The logic of flash read is simpler than that of write, and the speed of reading can be higher than writing to support the code executes from flash(XIP) to get the high performance.
What would be the ideal way to improve long-term stability of HyperFlash reads with SDK 2.9?
How are you currently making the continuous readings? What are the problems that you are seeing? What happens if you lower the clock frequency before reading the memory?
Regards,
Victor
Hello Niranjan Gopal,
I'm checking this internally. I will provide you a response as soon as possible.
Regards,
Victor