Implement the dual external flash feature for stm32 qspi #4761
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi All!
I am trying to implement the stm32 dual flash feature for use with the qspi module. I got some pointers from @Dirbaio on Matrix for what was initially needed, essentially some new constructors for the memory banks. It has resulted in this branch. I am having some problems getting it to work though. As soon as I set the dual flash flag to true(this flag was already implemented), the quad spi keeps getting stuck at busy after the first qspi command:

Im not sure if its the qspi setup or how the external memflash is implemented. My test code is based on the embassy example here:
https://github.com/embassy-rs/embassy/blob/main/examples/stm32h742/src/bin/qspi.rs
I came across the following in the stm32 reference manual regarding reading and writing in dual flash mode:

I am not that well versed on the embassy qspi code. Will the above require a change to how the transactions are setup before the read/write commands are executed?
(PS: if I set the dual flash flag to false, I can read and write to the (first) external flash just fine, so Im pretty sure the flash specific commands are all set correct.)
Anyone got some input?