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

teensy4-pins: add MicroMod pins #128

Merged
merged 1 commit into from
Feb 9, 2023
Merged

Conversation

cstrahan
Copy link
Contributor

@cstrahan cstrahan commented Feb 8, 2023

This adds the pins for the Teensy MicroMod.

I got the Pin# to Pad mapping from here: https://github.com/PaulStoffregen/cores/blob/2dbb6f6c58f3d8e1272286daba3f3b094893c5b3/teensy4/core_pins.h#L1209-L1775

And I compiled the list of alternative functions (for the doc comment) by referencing the manual.

(Thanks for all your work on the Teensy-related and imxrt crates!)

@mciantyre
Copy link
Owner

bors try

Looks great, thanks for adding this! I double-checked the pinouts and alternate functions.

I only recently learned about this board, so I was curious about the pin names. It looks like "pins" represent identifiers for processor pads, and they associate to what's available on the Teensy 4.0 and 4.1 board. Pins do not represent the pinout on the M.2 edge connector. For example, what we call pin 19 is broken out to the M.2 connector's bottom edge, pin 14.

The MicroMode pinout table explains all of this. This is all OK with me. If users prefer identifying pins by the M.2 edge connector, we could support that at a later time.

bors bot added a commit that referenced this pull request Feb 8, 2023
@bors
Copy link
Contributor

bors bot commented Feb 8, 2023

try

Build failed:

@mciantyre
Copy link
Owner

mciantyre commented Feb 8, 2023

Note that #86 applies here, too. There seems to be more flash available on this board. But for the purposes of building a firmware image and defining the FCB, we pretend that we only have Teensy 4.0 flash capacity.

@mciantyre
Copy link
Owner

bors try

bors bot added a commit that referenced this pull request Feb 8, 2023
We double-checked the pinout and alternate functions against the
official SDK and the reference manual.

"Pins" represent identifiers for processor pads, and they associate to
what's available on the Teensy 4.0 and 4.1 board. Pins do not represent
the pinout on the M.2 edge connector. For example, what we call pin 19
is broken out to the M.2 connector's bottom edge, pin 14.

This commit has no effect on the BSP's runtime. The MicroMod seems to
have additional flash storage. But, for the purposes of the runtime,
we're still pretending that we have Teensy 4.0 flash capacity.
@cstrahan
Copy link
Contributor Author

cstrahan commented Feb 8, 2023

Pins do not represent the pinout on the M.2 edge connector. For example, what we call pin 19 is broken out to the M.2 connector's bottom edge, pin 14.

True -- I probably should have mentioned that. I'm currently taking a stab at porting some Arduino code over to Rust -- this library that uses DMA+FlexIO to implement a parallel IO interface to ILI948x LCD controllers (the MicroMod breaks out just enough contiguous FlexIO pins to make it work): https://github.com/david-res/ILI948x_t4_mm

The end goal is to wire that up with Slint and see how well it performs.

In my use case, being able to think of pins in terms of their Arduino counterpart is most convenient, but if you're working on a bespoke carrier board for the MicroMod and have no existing Arduino code in mind, you probably want to work with the MicroMod's M.2 pin numbers. 🤔

@bors
Copy link
Contributor

bors bot commented Feb 9, 2023

try

Timed out.

@mciantyre
Copy link
Owner

Sounds like an awesome project. Reach out if you hit issues or have questions.

I'll release this in the 0.4 teensy4-bsp series later today.

@mciantyre mciantyre merged commit bbd97a6 into mciantyre:master Feb 9, 2023
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.

2 participants