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

HAL: Upstream from OVL works #14

Open
jamesmunns opened this issue Apr 22, 2022 · 6 comments
Open

HAL: Upstream from OVL works #14

jamesmunns opened this issue Apr 22, 2022 · 6 comments

Comments

@jamesmunns
Copy link
Contributor

jamesmunns commented Apr 22, 2022

Hey, I've been working on ATSAME70 support specifically in a repo as part of some contracting work (OVL => OneVariable UG Labs).

Since I've been focused on just this one chip, and a relatively limited set of features, it's probably not ready to merge 1:1, but just in case someone is interested, the repo is here, and I've published the crate under the name ovl-atsamx7x-hal for now, until this work gets upstreamed.

So far, I have the following components implemented:

  • EFC - basically just the ability to set wait states
  • GMAC - some corners rounded, really only tested to work with the KSZ8061 PHY, but capable of "doing ethernet" and has a smoltcp implementation capable of maintaining a TCP connection. Only supports one set of pins ATM
  • PIOx - generally all 5 ports are supported, and some pin functionality is working (mostly setting ABCD peripheral modes, and output pins)
  • PMC - Pretty rudimentary support, but enough to set some prescalers. I mostly use it to reach a single clock config (300MHz CPU clock, 150MHz MCK)
  • RTT - A fixed 8192kHz frequency, usable for rtic-monotonic::Monotonic and groundhog::RollingTimer trait implementations
  • Serial - I haven't really touched the upstream code here, I'm not using serial
  • SPI - Basic "transfer" API support for the SPI0 peripheral. Only supports one set of pins ATM
  • WDT - Basically just enough to shut it off

Feel free to take any of this work if you want/need it before I get a chance to upstream! I've kept the 0BSD license, so you can do what you'd like.

Edit (2022-04-22): Added RTT impl

@jamesmunns
Copy link
Contributor Author

Oh, there are also quite a few working examples in the same70-bringup project, available here.

@tmplt
Copy link
Member

tmplt commented Apr 22, 2022

Thanks for the notice. I'll take a more thorough look at it when able.

@michalfita
Copy link
Collaborator

@tmplt is there anything from that @jamesmunns work here that wasn't in #25?

@tmplt
Copy link
Member

tmplt commented Sep 16, 2022

Only the GMAC and groundhog::RollingTimer implementations. I'll push a WIP PR for the former tomorrow. I do not consider the latter in-scope for the HAL currently.

@tmplt
Copy link
Member

tmplt commented Sep 17, 2022

Superseded by #33. This issue can be closed.

@michalfita
Copy link
Collaborator

The #33 is a PR, as well as #32 and #31 which are continuation of work from #24.

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

3 participants