[go: nahoru, domu]

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

Arduino Portenta h7 additions #1455

Open
bm16ton opened this issue Jan 12, 2023 · 1 comment
Open

Arduino Portenta h7 additions #1455

bm16ton opened this issue Jan 12, 2023 · 1 comment

Comments

@bm16ton
Copy link
bm16ton commented Jan 12, 2023

Hello, Ive been working with my Portenta h7 stm32h747 with onboard ulpi/ram/flash. Ive managed to get clock set/get for i2c/qspi working, I2c (only tested in master and not much), the external ram , and USBHS working. SPI is putting up a fight. My coding ability is weak and I can barely follow the conversations in the Pull Requests section. Would any value come from me eventually submitting a pull request so those more talented maybe able to use it as a starting point?
Simpler things clock set/get, I2c is pretty much just adding the existing i2c version 2, sum minor fixes for comments, added registers for usbhs etc, maybe able to get merged.
Its very much a work in progress, so no care has been taken to clean up the example. Lots of commented out previous trials and the like. But here is my shame on display https://github.com/bm16ton/libopencm3-portentaH7
Eventually I will find a way to contribute back to this project/community, may not be this but something:)

@slorquet
Copy link
Contributor

Hi,
All coding efforts are worth sharing, thank you for this.

I am also working on a stm32h7 project.

The most important issue right now for this project is to get the structure of the lib files right.

Have a look at the common directory: Some drivers are already present, so you should not reimplement the functions that can be made common.

Regarding SPI I think the H7 has a new SPI hardware block called spiv3. This is different from spiv2 already present in the common stm32 directory.

This spiv3 block is likely to be used by several other stm32 variants, thats why it's not in a stm32/h7 directory but in stm32/common.

I have no idea where this v3 of the spi is coming from.

Inspiration about spi can be found in the NuttX project, which has a working SPI driver for stm32h7 (I am using it successfully right now). The NuttX project is Apache licensed, but the accesses to the registers can be observed and recoded in this project.

So the steps are
-determine is a common/spiv3 file is necessary
-determine the common operations and put them in stm32/common/spi_common_all and stm32/common/i2c_common_all
-compare all suggestions to get spi working and get the best from them
-test

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

No branches or pull requests

2 participants