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

H7 support: take 2 #77

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

H7 support: take 2 #77

wants to merge 30 commits into from

Conversation

datdenkikniet
Copy link
Contributor

@datdenkikniet datdenkikniet commented Feb 26, 2023

Due to the unfeasibility of merging of #70, here's a take 2 :)

An attempt at adding STM32H7XX support to stm32-eth.

TODO:

  • Switch to ring mode for f1, f4 and f7 so the same descriptor infrastructure can be used for h7
  • Make DMA work
  • Make MAC work
  • Integrate MDIO with MAC
  • Make PTP work
  • Figure out why async-await doesn't seem to fire/trigger interrupts like it should.

@datdenkikniet datdenkikniet force-pushed the h7-take2 branch 3 times, most recently from bbf2d2e to 19f907c Compare March 11, 2023 20:59
@datdenkikniet
Copy link
Contributor Author

datdenkikniet commented Sep 9, 2023

For posterity: I'm a bit anxious to merge this, as it overhauls the non-H7 side of things so massively.

I think that it is an OK change, but I feel that I have not been able to test this thoroughly enough, and putting it behind a feature flag is impossible (due to the changes to the non-H7 parts).

Another important problem is that the PTP implementation on the H7 is weird. Since it uses a second descriptor for storing the timestamp for RX packets, you would imagine that it would: fill the descriptor with the timestamp, increase the RX descriptor pointer by 1, and continue receiving. Sadly, that's not what it seems to do. Instead, it receives the packet, puts the timestamp in the next descriptor, and then attempts to continue receiving in that very same descriptor (which fails, since the descriptor is now no longer owned by the DMA as it contains a timestamp). This doesn't affect usage without the ptp flag, but I would still like to see if there really isn't a better way to do this.

This means that the entire RX pipeline is stalled until the packet is processed, which feels like a really bad/sad tradeoff.

I also no longer work at a company that uses embedded rust, so making thorough use of this implementation is not something I can do very well, unfortunately. I may find some more time/motivation to finally get this shipped closer to the end of the year, but it won't go very fast unfortunately

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.

None yet

1 participant