-
Notifications
You must be signed in to change notification settings - Fork 3k
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
QSPI driver double call qspi_init() #12678
Comments
cc @ARMmbed/mbed-os-hal
Lets fix this. That was a question but looks like a bug that should be opened and fixed. |
@dustin-crossman thank you for raising this issue.Please take a look at the following comments: We cannot automatically identify a release based on the version of Mbed OS that you have provided. |
Internal Jira reference: https://jira.arm.com/browse/IOTOSM-464 |
@adbridge See ^^ duplication |
MBOTRIAGE-2603 closed as duplicate and link deleted |
It was merged. This can be closed or what's left @dustin-crossman ? |
Description of defect
In QSPI::_initialize mbed::QSPI will call the target specific qspi_init() once. Later, if QSPI::_acquire() gets called (which it does in QSPI::read(), QSPI::write(), etc) qspi_init() will be called again. A better description of the issue is here: #11230 (Also note that there is still no documentation regarding this).
There seems to be 2 ways to resolve this:
In the meantime I believe there is a way to partially mitigate the issue:
In QSPI::_intialize (and _initialize_direct) the _initialized field is being set to true but the _owner field is not. Since _owner is false upon the first read/write call, _acquire() and therefore _initialize() will be called again even if no other QSPI object acquired ownership in the meantime. I think this is a bug regardless of the approach taken to fix this issue and is an easy fix.
I'm happy to put in a PR for the mitigation but I'd also like to see this resolved properly one way or the other.
Target(s) affected by this defect ?
All
Toolchain(s) (name and version) displaying this defect ?
All
What version of Mbed-os are you using (tag or sha) ?
539cf3f
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
N/A
How is this defect reproduced ?
Any use of QSPI driver will reproduce this defect.
The text was updated successfully, but these errors were encountered: