-
Notifications
You must be signed in to change notification settings - Fork 14
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
Extending LPSPI pin trait to support non-zero chip select #33
Comments
There's an overarching issue: we have no way to express non-zero LPSPI chip selects in the type system. This is why contributions like #12 skip those pin implementations. I've re-written this issue's title and description accordingly. Once we have both of
then those two If you're looking to make progress without these larger contributions, there may be limited workarounds:
|
I would be very grateful to be mentored. This will familiarize me with the code base, and allow me to contribute to it, both goals of mine. Having a smooth, wieldy API is always satisfying, and so I'd love to do it right and also Rustically. |
Sounds great. I expect this to be a straightforward feature. Here's the gist of an approach... To start, we'll need three more For your learning:
After that, we're doing similar work as #12, but we're adding implementations for the 1060's PCS1, PCS2, and PCS3 pins. It's a route, manual "translate a table into Rust" process. Here is a copy of the reference manual (RM). Chapter 10 has the pin muxing. Scan the left-most column for the It doesn't look like there are any daisy registers associated with non-zero chip selects. I'm hastily scanning the RM to make this claim (and there's no auto-generated daisy registers already in the module). That means we can set the daisy fields to |
Superb! Thank you for the help and info. I will start on this ASAP. Many thanks for your help and encouragement. |
Okay, looks like your workflow is branch-for-maintenance, not branch-for-development. I see that you've bumped the package version to 0.3, so I will branch from master. |
imxrt-iomuxc does not have a way to express non-zero LPSPI chip selects. We only identify PCS0 pins, along with the data and clock pins. Without a way to identify non-zero LPSPI chip selects in the type system, we cannot use imxrt-iomuxc APIs to configure PCS1, PCS2, and PCS3 pads.
This issue tracks support for an API to express these pins. This issue does not track MCU pin implementations; we'll use subtasks of #14 to track that effort.
(The original issue continues below.)
results in:
But those are truly are PSC0-1 and PCS0-2 for LPSPI4 (Teensy 4.1).
Is there a better way to use the HAL for a SPI bus that has multiple peripherals and therefore needs multiple PCS lines where each can be enabled when needed?
Many thanks!
The text was updated successfully, but these errors were encountered: