Teensy 4.0 which pins for which ADC

Status
Not open for further replies.
KurtE TeensyDocuments shows more pins... ?

I put my Excel documents up on github: https://github.com/KurtE/TeensyDocuments

Thank you for making this available.

Your document shows many more pins than the "Welcome to Teensy 4.0" card/jpeg shows. For example, your card shows:
Pin 0: SPI1(3) CS0 (I assume this was meant to be just "CS")
Pin 1: SPI1(3) MISO

First, is this sheet accurate? I assume it is. I'm guessing some pins weren't shown on the graphic due to lack of space.

Can you point me to an example of how I activate those pins for that mode (e.g. Pin0 SPI1 CS)?

Also, I was hoping to find something that helps me understand what Timers are shared by what (PWM) pins. Is that somehow encoded on this spreadsheet?
I did find the answers to these questions in other posts... and do not believe your spreadsheet shows the timers associated with PWM pins.

Thanks
 
Last edited:
@JImKazmer - net sure what this has to do with Teensy 4 which pins....


But I do try to make the spreadsheet as accurate as possible and as usable to myself as possible.

I should mention there is no magic or voodoo in creating these table.

For example Pin0, if you look at how each pin is defined. That is much of these tables were create as part of the T4 beta. Paul supplied a lot of the data, plus he stared the beta with some of the underlying stuff defined So if you look in cores\teensy4\core_pins.h

If you look at CORE_PIN0_BIT you will see 3 likewise CORE_PIN0_PORTREG = GPIO6_DR So form this you know that this is logically pin 6.3. Note there is a little magic to know that some of the ports map to each other 0.3 is 6.3...

You can do a few searches to find out that this corresponds to logical pin AD_B0_03. Now if you look at the reference manual for the IMXRT and in this case look for SW_MUC_CTRL_PAD_GPIO_AD_B0_03 Page 473 in my version, which I think is the same one as you can now download from PJRC...
In here you see the Mux modes for this pin:
Code:
MUX Mode Select Field.
Select one of iomux modes to be used for pad: GPIO_AD_B0_03.
000 ALT0 — Select mux mode: ALT0 mux port: FLEXCAN2_RX of instance: flexcan2
001 ALT1 — Select mux mode: ALT1 mux port: XBAR1_INOUT17 of instance: xbar1
010 ALT2 — Select mux mode: ALT2 mux port: LPUART6_RX of instance: lpuart6
011 ALT3 — Select mux mode: ALT3 mux port: USB_OTG1_OC of instance: usb
100 ALT4 — Select mux mode: ALT4 mux port: FLEXPWM1_PWMX01 of instance: flexpwm1
101 ALT5 — Select mux mode: ALT5 mux port: GPIO1_IO03 of instance: gpio1
110 ALT6 — Select mux mode: ALT6 mux port: REF_CLK_24M of instance: anatop
111 ALT7 — Select mux mode: ALT7 mux port: LPSPI3_PCS0 of instance: lpspi3

And in this you will see the different things that this pin can actually do, including the LPSIP3_PCS0 when Mode 7...


Now as to how to convert this IO pin into SPI3 CS mode...
You preferably use system function to do so, or you set this register to the value ox7, actually you probably want to or the setting with 0x10...

Now if you find bugs in my tables, let me know.
 
Status
Not open for further replies.
Back
Top