Skip to content

STM32F7 QSPI flash timeouts and 4-byte addressing #152

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

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

Jookia
Copy link

@Jookia Jookia commented Mar 11, 2023

Summary of changes

On the STM32769NI the STM32 BSP has an issue where QSPI accesses timeout and require a chip reset. Mbed use to contain a patch to fix this similar to this one but the change was lost during an update.

Enable the workaround ST uses for specific F7 chips but on all chips. There's no downside to this from what I can tell.

The 4-byte addressing was disabled because of timeouts which I think are due to this issue but falsely misattributed to 4-byte addressing. Enable that again.

Further discussions:

ARMmbed#10049
ARMmbed#15108

STMicroelectronics/STM32CubeF7#52
STMicroelectronics/STM32CubeF7#82

Impact of changes

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

I'm not sure how to make a test for this yet. The issue takes an hour to recreate.

Jookia added 2 commits March 11, 2023 14:20
On the STM32769NI at least this patch is required for stable QSPI use.
Enable it uncondtionally in case other boards need it too.

Further discussions:

ARMmbed#10049
ARMmbed#15108

STMicroelectronics/STM32CubeF7#52
STMicroelectronics/STM32CubeF7#82
mbed-os PR 11531 introduced 4-byte addressing in the QSPIF block device:

ARMmbed#11531

During testing it was found that this code broke on the NRF52840_DK and
DISCO_F769NI.

The NRF52840_DK controller seems unable to handle 4-byte addressing at
all and has been disabled entirely in another code section.

The DISCO_F769NI breakage was attributed to the flash chip but after more
research I believe this is related to the QSPI controller, not the 4-byte
addressing itself.

Now that the QSPI controller has a workaround, enable 4-byte addressing
again and hope it works fine this time.
@multiplemonomials
Copy link
Collaborator

Thanks for the patch! Did you test this on hardware?

@Jookia
Copy link
Author

Jookia commented Mar 21, 2023 via email

@multiplemonomials
Copy link
Collaborator

Awesome, in that case, I'll give it the green light!

Regarding the other issue... it's hard to say. It would be good to fix that issue, but I don't want to merge a fix that hasn't been tested on other devices. It's hard to know if it might break something else. It's tough because we don't have any sort of CI setup that can test any of the devices with QSPI.

@multiplemonomials multiplemonomials merged commit ea044e0 into mbed-ce:master Mar 21, 2023
@Jookia Jookia deleted the RFC_4byte4u branch March 21, 2023 16:19
@Jookia
Copy link
Author

Jookia commented Mar 21, 2023

Thanks for the merge! If the bug happens again I'll try and reproduce it proper and fix it for everyone. :)

@JohnK1987
Copy link
Member

JohnK1987 commented Mar 21, 2023

You change code inside ST's HALs what is copied into Mbed. How do we ensure that change will be mirrored into new version (during port to MbedOS) if it will be necessary to change it for a reason in future?

BR, Jan

@Jookia
Copy link
Author

Jookia commented Mar 21, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants