embassy icon indicating copy to clipboard operation
embassy copied to clipboard

Add octospim support for octospi

Open HaoboGu opened this issue 1 year ago • 5 comments

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

HaoboGu avatar Jun 21 '24 06:06 HaoboGu

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 avatar Jun 23 '24 11:06 HaoboGu

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

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

HaoboGu avatar Jun 25 '24 16:06 HaoboGu

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 avatar Jul 03 '24 14:07 ninjasource

@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 avatar Jul 03 '24 16:07 HaoboGu

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?

HaoboGu avatar Jul 04 '24 02:07 HaoboGu

Added a way to support both OCTOSPI1 and OCTOSPI2

HaoboGu avatar Oct 12 '24 07:10 HaoboGu

This PR can be merged now.

HaoboGu avatar Oct 12 '24 16:10 HaoboGu

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?

ninjasource avatar Oct 15 '24 16:10 ninjasource

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

HaoboGu avatar Oct 15 '24 17:10 HaoboGu

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.

ninjasource avatar Oct 15 '24 17:10 ninjasource