Skip to content
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

Add octospim support for octospi #3102

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

HaoboGu
Copy link
Contributor

@HaoboGu HaoboGu commented Jun 21, 2024

This PR adds initial support for OCTOSPIM peripheral of octospi. Current implementation just adds OCTOSPIM to octospi, and enables corresponding pins of OCTOSPIM.

Closes #3097

@HaoboGu
Copy link
Contributor Author

HaoboGu commented Jun 23, 2024

I've tested this PR on stm32h7b0 + w25q64 qspi flash, worked well. But there are still limitations of current implementation:

  1. Current implementation supports OCTOSPI1 only. Different octospim register value should be configured for OCTOSPI1/2, but Ospi struct has no information about it.
  2. In build.rs, I also hardcoded OCTOSPI1 for pin_trait_impl.

@HaoboGu HaoboGu marked this pull request as ready for review June 23, 2024 11:47
@HaoboGu
Copy link
Contributor Author

HaoboGu commented Jun 25, 2024

Did more testing on a rm67162 qspi screen, worked too.

Demo project: https://github.com/HaoboGu/eg-demo

@ninjasource
Copy link
Contributor

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?

@HaoboGu
Copy link
Contributor Author

HaoboGu commented Jul 3, 2024

@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

@HaoboGu
Copy link
Contributor Author

HaoboGu commented Jul 4, 2024

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?

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.

Cannot create ospi instance for stm32h7b0
2 participants