-
Notifications
You must be signed in to change notification settings - Fork 3k
Differentiate alt and dummy cycles in QSPIF #11297
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
Conversation
ca69263
to
d659461
Compare
@kyle-cypress, thank you for your changes. |
@ARMmbed/mbed-os-storage Please review |
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. But I would like to see someone else also to review this as I'm not that familiar with the subject 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.
@davidsaada @bentcooke can you guys have a look please
@offirko mind taking a quick look? |
The code updates seems to be good. |
@ARMmbed/team-st-mcd would you be able to quickly review this if all is good ? I'll run Ci in the meantime |
CI started |
Hi
I requested to ST CI features-storage-tests-blockdevice-general_block_device test |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Waiting for the confirmation |
First tests not very good :-(
|
@kyle-cypress unfortunately, this needs work |
We believe we have found the issue. It appears that commit 05899e9 introduced a latent bug in the STM QSPI API which is only triggered when |
@ARMmbed/team-st-mcd can you retest please? |
already started :-) |
I am proposing to move this to 5.14.1 , as there are few other changes needed for 5.14 that can't go into the patch release. I'll remove the label, we need more testing allowed for this one. |
0f39b2e
to
56f8e01
Compare
Pushed up a new changeset which should address the build failures. The cause of the failures is that the previous version of the commit was an early proof of concept, but several other drivers needed to be updated in order for the build to pass. |
We are only able to test this on Cypress targets. I think the best approach would be if someone from your side is able to debug with the other failing targets and identify root causes of the failures, then we can adjust our proposed changeset as necessary. |
Yes, that would be the idea. I'll talk to our @ARMmbed/mbed-os-test team how to help with testing |
CI restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
FYI @maciejbocianski |
Can we split this from this PR? I would like to review this separately and proceed. It's not related to the block device, just HAL/driver. Please describe why alt should be any number and how it changes QSPI apps (blockdevices and others). Can this be done backward compatible (functional change) ? |
This this is to illustrate the proposal in #11297 (comment) , as requested in #11297 (comment).
If you agree that this change makes sense in principle, I will split off a new PR (on which this one would then depend) to track discussion of the specifics. |
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'm getting quite different results comparing to @jeromecoutant results.
DISCO_F413ZH
passes with and without fix while 'DISCO_L475VG_IOT01A' is failing with fix.
targets/TARGET_STM/qspi_api.c
Outdated
// Align alt value to the end of the most significant byte | ||
st_command->AlternateBytes = command->alt.value << leftover_bits; | ||
} else { | ||
rounded_size -= 1; |
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 line shouldn't be here. It cause that rounded_size
falls below 0 in some cases
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.
The QSPI spec allows alt to be any size that is a multiple of the number of data lines. For example, Micron's N25Q128A uses only a single alt cycle for all read modes (1, 2, or 4 bits depending on how many data lines are in use).
56f8e01
to
7d3dd3e
Compare
Remove an extraneous decrement operation in cases where the alt bits size is a multiple of 8.
Propagate separate alt cycle and dummy cycle counts from QSPIFBlockDevice down to the qspi driver, so that drivers which handle the two separately have enough information to do so.
7d3dd3e
to
6bba46e
Compare
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.
Tested with ARMC6 with:
- DISCO_L496AG
- DISCO_L476VG
- DISCO_F769NI
- DISCO_F469NI
- DISCO_F746NG
- DISCO_F413ZH
- DISCO_L475VG_IOT01A
Also tested on
|
@ARMmbed/mbed-os-maintainers Any blockers on this one? Can it be merged yet? |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
Proposed fix for #11295
Propagate separate alt cycle and dummy cycle counts from QSPIFBlockDevice
down to the qspi driver, so that drivers which handle the two separately have
enough information to do so.
Submitting the pull request now to obtain feedback on the change. Greentea test logs will be attached soon.
Pull request type
Reviewers
@ARMmbed/team-cypress
Release Notes