-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mimxrt10xx/boards: Increase the flash CLK frequency. #428
Conversation
CLK is increased to the highest value defined in the data sheets of the respective flash device. The previous values of 60MHz and 30MHz reduce the speed of the APP. Tested with: - arch_mix_1052 - imxrt1010_evk - imxrt1015_evk - imxrt1020_evk - makerdiary_rt1011 - metro_m7_1011 - olimex_rt1010 Signed-off-by: robert-hh <robert@hammelrath.com>
Thanks you for your PR. Though I am off for TET (Lunar New Year) and won't be able to review this in 2 weeks. Happy New Year |
fyi @tannewt |
@ladyada Thanks for noticing Scott. I'm not sure if the change I suggested is fine under all conditions. The flash chip in these boards would not support 100Mhz or 133Mhz with the simple read command (0x03). No problem with fast read. An alternative would be to change the flash frequency one the app is started, but I did not find a way to do so. Maybe not yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok because the LUT commands all do quad reads. This will speed up app startup. Thanks!
It is possible to change the frequency after startup. We do it here in CircuitPython: https://github.com/adafruit/circuitpython/blob/3236a0f200a3eb10594e6fec6f077fe0a2812d30/ports/mimxrt10xx/supervisor/internal_flash.c#L40-L85
Thank you for both merging the PR and the hint for changing the frequency change. I have another question: |
I'm not sure how QE is set initially. I haven't looked at this in ages. |
I hooked up a logic analyzer to see what happens after reset |
About changing the flash clock at runtime. I used the code from your link as template. As an element of pedantic, I add a mechanism to change the clock to any of the possible frequencies by modifying both the pfd_480 and the flexspi PODF dividers, using the values below which give the closest match.
|
CLK is increased to the highest value defined in the data sheets of the respective flash device. The previous values of 60MHz and 30MHz reduce the speed of the APP. Tested with: