Add octospim support for octospi
This PR adds initial support for OCTOSPIM peripheral of octospi. Current implementation just adds OCTOSPIM to octospi, and enables corresponding pins of OCTOSPIM.
Closes https://github.com/embassy-rs/embassy/issues/3097
I've tested this PR on stm32h7b0 + w25q64 qspi flash, worked well. But there are still limitations of current implementation:
- Current implementation supports OCTOSPI1 only. Different octospim register value should be configured for OCTOSPI1/2, but
Ospistruct has no information about it. - In
build.rs, I also hardcodedOCTOSPI1forpin_trait_impl.
Did more testing on a rm67162 qspi screen, worked too.
Demo project: https://github.com/HaoboGu/eg-demo
Hi @HaoboGu, I managed to use your branch on an stm32h735g-dk to communicate with PSRAM through the hyperbus. However, I had to use OCTOSPI2 because of how the dev kit is wired up so I think it's worth trying to figure out how to support OCTOSPI2 as well. Are you still working on this branch?
@ninjasource Yeah, OCTOSPI2 is not support now. I had some problems when implementing it for both OCTOSPI1 and OCTOSPI2. For a temporary solution, you can change here and here to make it work for OCTOSPI2
I've pushed a commit making it possible to support both OCTOSPI1 and OCTOSPI2. But
Different octospim register value should be configured for OCTOSPI1/2, but Ospi struct has no information about it.
This problem is still there. @Dirbaio Do you have any suggestions on solving it?
Added a way to support both OCTOSPI1 and OCTOSPI2
This PR can be merged now.
Hi @HaoboGu, thanks for your work on octospim. However, I cannot find any examples I can test and your eg-demo linked above is a broken link. Do you have any examples for us to look at?
Hi @HaoboGu, thanks for your work on octospim. However, I cannot find any examples I can test and your eg-demo linked above is a broken link. Do you have any examples for us to look at?
Hey @ninjasource I just made the project public
Hi @HaoboGu, thanks for your work on octospim. However, I cannot find any examples I can test and your eg-demo linked above is a broken link. Do you have any examples for us to look at?
Hey @ninjasource I just made the project public
Thanks!
I have raised an issue I encountered in your repo so as not to add noise to this closed repo.