-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix setting the QE bit on ISSI Flash memories #12947
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
Fix setting the QE bit on ISSI Flash memories #12947
Conversation
By default QSPIFBlockDevice assumes a Flash memory have two Status registers and when writing the Status registers it writes 2 bytes using the WRSR instruction. This will not work on a ISSI Flash memory as they only have a single status register and attempting to write two bytes using WRSR will cause it to ignore the request and be unable to set the QE bit. ISSI datasheet specifies that the WRSR instruction only write a single byte so override the number of status registers for ISSI Flash memories.
@Uruloke I would like you to paste the test results when you run filesystem tests with your board. Why I'm asking for those is due to the fact our PR checks don't check for how QSPIF modules behave - that's at least my understanding.
I pulled your PR and checked that tests are passing with your changes on a board I'm having.
After you send the results you should update the PR description to tell that the tests results are supplied as part of this PR. |
Okay, I'll do this first thing on Monday. How does the mbed testing work? Does it need a two-way communication with the host PC to work? On my board I only have the SWO output with a custom Stream-based class acting as console. If it needs a serial port of some sort I'll have to modify my board for it. |
Yes, it does.
Ok, if this is going to cause extra work I think we can live without the results. |
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.
Looks good to me
CI started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
@VeijoPesonen I tried to run the tests as you instructed but having read up on how Greentea actually works I realized there's no way I'd be able to get the automated tests running on my own board. I could possibly manually run each test if I read up more on how it works but it'd take time. I have verified that the change does work on my board though as I can use LittleFS without issues with it. |
Summary of changes
By default QSPIFBlockDevice assumes a Flash memory have two Status registers and when writing the Status registers it writes 2 bytes using the WRSR instruction. This will not work on a ISSI Flash memory as they only have a single status register and attempting to write two bytes using WRSR will cause it to ignore the request and be unable to set the QE bit.
ISSI datasheet specifies that the WRSR instruction only write a single byte so override the number of status registers for ISSI Flash memories.
Fixes #12784.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
Reviewers