40 40 B0_04 2:04 Wire?(2) SCL QT2_1 2:4 LCD_DATA0
41 42 B0_05 2:05 Wire?(2) SDA QT2_2 2:5 LCD_DATA1
42 44 B0_06 2:06 QT3_0 2:6 LCD_DATA2
43 46 B0_07 2:07 QT3_1 2:7 LCD_DATA3
44 48 B0_08 2:08 QT3_2 2:8 LCD_DATA4
45 73 B0_09 2:09 QT4_0 2:9 LCD_DATA5
I have not looked yet to see if enough pins in the LCD_ pins to be used or not.
Pin MM Pin MM ATP Machine Learning Machine 2nd use Name GPIO
USB D+ 3 USB_D+ USB_D+
28 4 3.3V_EN 3.3V_EN EMC_32 3.18
USB D- 5 USB_D- USB_D-
27/A13 8 G11 AD_B1_15 1.31
4 10 D0 D0 HEADER_CS EMC_06 4.6
18/A4 12 I2C_SDA I2C_SDA AD_B1_01 1.17
19/A5 14 I2C_SCL I2C_SCL AD_B1_00 1.16
29 16 I2C_INT# CAMERA_INT EMC_31 4.31
0 17 UART_TX1 TX1 AD_B0_03 1.3
5 18 D1 D1 CAMERA_TRIG EMC_08 4.8
1 19 UART_RX1 RX1 AD_B0_02 1.2
16/A2 20 UART_RX2 AD_B1_07 1.23
17/A3 22 UART_TX2 AD_B1_06 1.22
3 32 PWM0 PWM0 EMC_05 4.5
14/A0 34 A0 A0 AD_B1_02 1.18
HUSB D+ 35 USBHOST_D+
HUSB D- 37 USBHOST_D-
15/A1 38 A1 A1 AD_B1_03 1.19
40 40 G0/BUS0 CAMERA_D0 B0_04 2:04
30 41 CAN_RX EMC_37 3.23
41 42 G1/BUS1 CAMERA_D1 B0_05 2:05
31 43 CAN_TX EMC_36 3.22
42 44 G2/BUS2 CAMERA_D2 B0_06 2:06
43 46 G3/BUS3 CAMERA_D3 B0_07 2:07
2 47 PWM1 PWM1 CAM_VDD EMC_04 4.4
44 48 G4/BUS4 CAMERA_D4 B0_08 2:08
22/A8 49 BATT_VIN3 BATT_VIN3 AD_B1_08 1.24
21/A7 50 AUD_BCLK I2S_SCK PDM_CLK AD_B1_11 1.27
25/A11 51 I2C_SDA1 AD_B0_13 1.13
20/A6 52 AUD_LRCLK I2S_WS PDM_DAT AD_B1_10 1.26
24/A10 53 I2C_SCL1 AD_B0_12 1.12
8 54 AUD_IN I2S_SD CAMERA_PCLK B1_00 2.16
10 55 SPI_CS SPI_CS B0_00 2.0
7 56 AUD_OUT CAMERA_MCLK B1_01 2.17
13 57 SPI_SCK SPI_SCK B0_03 2.3
23/A9 58 AUD_MCLK AD_B1_09 1.25
11 59 SPI_SCOPI SPI_SCOPI B0_02 2.2
36 60 SDIO_SCK SD_B0_01 3.13
12 61 SPI_CIPO SPI_CIPO B0_01 2.1
37 62 SDIO_CMD SD_B0_00 3.12
33 63 G10 CAMERA_VSYNC EMC_07 4.7
35 64 SDIO_DATA0 SD_B0_02 3.14
32 65 G9 CAMERA_HSYNC B0_12 2.12
34 66 SDIO_DATA1 SD_B0_03 3.15
26/A12 67 G8 AD_B1_14 1.30
38 68 SDIO_DATA2 SD_B0_05 3.17
9 69 G7/BUS7 CAMERA_D7 B0_11 2.11
39 70 SDIO_DATA3 SD_B0_04 3.16
6 71 G6/BUS6 CAMERA_D6 B0_10 2.10
45 73 G5/BUS5 CAMERA_D5 B0_09 2:09
--- ---- ----
SD Pins - Cable connector(T4 34-39)
@Paul : the MicroMod is HEX 26 { 0x26 } not Decimal 26 - See github.com/PaulStoffregen/teensy_size/pull/3
D:\Tim\downloads\teensy_size-main\teensy_size-main>"teensy_size" "C:\\Users\\Tim\\AppData\\Local\\Temp\\arduino_build_43/LoopCnt.ino.elf"
teensy_size: Memory Usage on Teensy MicroMod:
teensy_size: FLASH: code:9288, data:1180, headers:7212 free for files:16497392
teensy_size: RAM1: code:32768, variables:8896 free for local variables:482624
teensy_size: RAM2: variables:12384 free for malloc/new:511904
An interesting fun is going to be: looking at these carrier boards like the ATP board, and when I look at a pin labeled G10, having to translate that every time to know that is probably Teensy pin: 33
Again I added the ATP pins to one of my tables. Extract from....
Probably someone is going to have to make a set of decals or the like that you can easily mark up to know which pin is whichCode:Pin MM Pin MM ATP Machine Learning Machine 2nd use Name GPIO USB D+ 3 USB_D+ USB_D+ 28 4 3.3V_EN 3.3V_EN EMC_32 3.18 USB D- 5 USB_D- USB_D- 27/A13 8 G11 AD_B1_15 1.31 4 10 D0 D0 HEADER_CS EMC_06 4.6 18/A4 12 I2C_SDA I2C_SDA AD_B1_01 1.17 19/A5 14 I2C_SCL I2C_SCL AD_B1_00 1.16 29 16 I2C_INT# CAMERA_INT EMC_31 4.31 0 17 UART_TX1 TX1 AD_B0_03 1.3 5 18 D1 D1 CAMERA_TRIG EMC_08 4.8 1 19 UART_RX1 RX1 AD_B0_02 1.2 16/A2 20 UART_RX2 AD_B1_07 1.23 17/A3 22 UART_TX2 AD_B1_06 1.22 3 32 PWM0 PWM0 EMC_05 4.5 14/A0 34 A0 A0 AD_B1_02 1.18 HUSB D+ 35 USBHOST_D+ HUSB D- 37 USBHOST_D- 15/A1 38 A1 A1 AD_B1_03 1.19 40 40 G0/BUS0 CAMERA_D0 B0_04 2:04 30 41 CAN_RX EMC_37 3.23 41 42 G1/BUS1 CAMERA_D1 B0_05 2:05 31 43 CAN_TX EMC_36 3.22 42 44 G2/BUS2 CAMERA_D2 B0_06 2:06 43 46 G3/BUS3 CAMERA_D3 B0_07 2:07 2 47 PWM1 PWM1 CAM_VDD EMC_04 4.4 44 48 G4/BUS4 CAMERA_D4 B0_08 2:08 22/A8 49 BATT_VIN3 BATT_VIN3 AD_B1_08 1.24 21/A7 50 AUD_BCLK I2S_SCK PDM_CLK AD_B1_11 1.27 25/A11 51 I2C_SDA1 AD_B0_13 1.13 20/A6 52 AUD_LRCLK I2S_WS PDM_DAT AD_B1_10 1.26 24/A10 53 I2C_SCL1 AD_B0_12 1.12 8 54 AUD_IN I2S_SD CAMERA_PCLK B1_00 2.16 10 55 SPI_CS SPI_CS B0_00 2.0 7 56 AUD_OUT CAMERA_MCLK B1_01 2.17 13 57 SPI_SCK SPI_SCK B0_03 2.3 23/A9 58 AUD_MCLK AD_B1_09 1.25 11 59 SPI_SCOPI SPI_SCOPI B0_02 2.2 36 60 SDIO_SCK SD_B0_01 3.13 12 61 SPI_CIPO SPI_CIPO B0_01 2.1 37 62 SDIO_CMD SD_B0_00 3.12 33 63 G10 CAMERA_VSYNC EMC_07 4.7 35 64 SDIO_DATA1 SD_B0_02 3.14 32 65 G9 CAMERA_HSYNC B0_12 2.12 34 66 SDIO_DATA1 SD_B0_03 3.15 26/A12 67 G8 AD_B1_14 1.30 38 68 SDIO_DATA2 SD_B0_05 3.17 9 69 G7/BUS7 CAMERA_D7 B0_11 2.11 39 70 SDIO_DATA3 SD_B0_04 3.16 6 71 G6/BUS6 CAMERA_D6 B0_10 2.10 45 73 G5/BUS5 CAMERA_D5 B0_09 2:09 --- ---- ---- SD Pins - Cable connector(T4 34-39)
uint32_t xx = 3; // pick TEST inloop() :: 0,1,2 >> change this before compile - or add query in setup() to set
void setup() {
Serial.begin(115200);
while (!Serial && millis() < 4000 );
Serial.println("Compile Time:: " __FILE__ " " __DATE__ " " __TIME__);
analogReadRes(12);
analogWriteRes(12);
Serial.print("This Teensy Digital Pin Count :: ");
Serial.println(NUM_DIGITAL_PINS);
HelpMe();
}
uint32_t cnt = 0;
void loop() {
cnt++;
if ( xx == 0 ) {
// array pinsSDIO[] requires PINS JUMPERED: 34>37, 35>38, 36>39
sdioTestPWM( cnt );
}
else if ( xx == 1 ) {
// This code changes Voltage seen on each pin
// Freq changes in pin pairs: 34/35, 36/37, 38/39
sdioTestVolts( cnt );
}
else if ( xx == 2 )
{
// Paul's code changes FREQ to each pin
// uint32_t xx = 2; // change this before compile - or add query in setup() to set
loopPaulHz();
}
else if ( xx == 3 ) {
allPinTest( cnt );
}
else if ( xx == 4 ) {
aLogPinTest( cnt );
}
int xxQ = tellMe( 0 );
if (xxQ < 10 ) xx = xxQ;
}
elapsedMillis emiWait;
uint32_t emWaitM;
uint32_t pinsSDIO[9] = { 34, 35, 36, 37, 38, 39, 34, 35, 36 }; //note first three repeat duplicates
//uint32_t pinsSDIO[9] = { 34, 35, 36, 37, 39, 38, 34, 35, 36 };
FASTRUN void sdioTestPWM( uint32_t cnt) {
int ii, mm, nn;
if ( cnt % 2 ) mm = 0;
else mm = 3;
for ( ii = mm; ii < mm + 3; ii++ ) {
nn = ii + 3;
// pinMode( pinsSDIO[ii], INPUT_DISABLE); // Not required - pin state set on analogWrite
pinMode( pinsSDIO[nn], INPUT);
}
for ( ii = mm; ii < mm + 3; ii++ ) {
nn = ii + 3;
//analogWriteFrequency( pinsSDIO[ii], (nn + (cnt % 4)) * 1000000 ); // Similar results on changing or other frequencies
analogWriteFrequency( pinsSDIO[ii], 16664000 );
analogWrite( pinsSDIO[ii], 128 );
delayMicroseconds( 4);
uint32_t pCnt = 0, Cnt0 = 0, Cnt1 = 0;
while ( 0 == digitalReadFast( pinsSDIO[nn] ) );
while ( digitalReadFast( pinsSDIO[nn] ) );
emiWait = 0;
emWaitM = millis() + 500;
while ( emiWait < 500 ) {
// while ( emWaitM >millis() ) {
while ( 0 == digitalReadFast( pinsSDIO[nn] ) ) Cnt0++;
while ( digitalReadFast( pinsSDIO[nn] ) ) Cnt1++;
pCnt++;
}
Serial.print(ii);
Serial.print(" Cnt=");
Serial.print(pCnt * 2);
Serial.print(" PWM out =");
Serial.print(pinsSDIO[ii]);
Serial.print(" Dig Read =");
Serial.print(pinsSDIO[nn]);
Serial.print(" Cnt0's=");
Serial.print(Cnt0);
Serial.print(" Cnt1's=");
Serial.print(Cnt1);
Serial.println();
}
Serial.println();
}
FASTRUN void sdioTestVolts( uint32_t cnt) {
int ii, nn;
for ( ii = 0; ii < 6; ii++ ) {
nn = 1 + ii;
analogWriteFrequency( pinsSDIO[ii], nn * 1000 );
analogWrite( pinsSDIO[ii], nn * 32 );
}
while (1) {
}
}
uint32_t n = 0;
void loopPaulHz()
{
#ifdef GPIO8_GDIR
GPIO8_GDIR |= (0x3F << 12);
n++;
GPIO8_DR = (GPIO8_DR & ~(0x3F << 12)) | ((n & 0x3F) << 12);
delayMicroseconds(50);
#endif
}
uint32_t pinLast[NUM_DIGITAL_PINS];
void allPinTest( uint32_t cnt ) {
uint32_t ii, SET;
Serial.print("PULLDOWN Start Vals:\n ");
SET = 0;
Serial.print("PULLDOWN :: TEST to 3.3V\n ");
for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
pinMode( ii, INPUT_PULLDOWN );
delayMicroseconds( 5 );
pinLast[ii] = digitalReadFast( ii );
if (pinLast[ii]) {
Serial.print("\nd#=");
Serial.print( ii );
Serial.print( " val=" );
}
Serial.print( pinLast[ii] );
Serial.print(',');
}
Serial.println();
Serial.println();
while ( 1 ) {
uint32_t jj, dd = 0, cc = 0;
cc = 0;
for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
jj = digitalReadFast( ii );
if ( jj != pinLast[ii] ) {
dd = 1;
cc++;
pinLast[ii] = jj;
Serial.print("d#=");
Serial.print( ii );
if ( pinLast[ii] ) Serial.print( "\t" );
Serial.print( " val=" );
Serial.print( pinLast[ii] );
Serial.print(',');
}
if ( cc > 1 ) {
Serial.println(">>>");
}
if ( Serial.available() ) {
while ( Serial.available() ) Serial.read();
if ( 0 == SET ) {
SET = 1;
Serial.print("PULLUP :: TEST TO GND\n ");
}
else {
SET = 0;
Serial.print("PULLDOWN :: TEST to 3.3V\n ");
}
for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
if ( 0 == SET )
pinMode( ii, INPUT_PULLDOWN );
else
pinMode( ii, INPUT_PULLUP );
delayMicroseconds( 20 );
pinLast[ii] = digitalReadFast( ii );
if (SET != pinLast[ii]) {
Serial.print("d#=");
Serial.print( ii );
Serial.print( " val=" );
Serial.println( pinLast[ii] );
}
}
}
}
if ( dd ) {
dd = 0;
Serial.println();
delay( 50 );
}
}
}
PROGMEM char showText [][48] = {
"Enter # below for test choice\t ver0.1\n",
"\t0: test 34,35,36 crossed to 36,37,38\n",
"\t1: change voltage on 34-39\n",
"\t2: change Freq on 34-39\n",
"\t3: All Pins Test digital\n",
"\t4: Test Analog A0-A13 \n",
""
};
int tellMe( int whatNow ) {
int retVal = 0;
if ( 0 == whatNow )
if ( Serial.available() ) while ( Serial.available() ) Serial.read();
else return 100;
HelpMe();
while ( Serial.available() ) {
char chi = Serial.read();
if ( chi >= '0' && chi <= '9' ) retVal = chi - '0';
}
return retVal;
}
void HelpMe() {
uint32_t ii = 0;
while ( 0 != showText[ii][0] ) {
Serial.print( showText[ii] );
ii++;
}
}
uint32_t pinAlog[ 14 ] = {A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13}; // FAKE NUM_ANALOG_INPUTS==14 t4 p#14-#27
void aLogPinTest( uint32_t cnt ) {
uint32_t ii, SET;
Serial.print("PULLDOWN Start Vals:\n ");
SET = 0;
Serial.print("PULLDOWN :: TEST to 3.3V\n ");
for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
pinMode( ii, INPUT_PULLDOWN );
delayMicroseconds( 5 );
pinLast[ii] = digitalReadFast( ii );
if (pinLast[ii]) {
Serial.print("\nd#=");
Serial.print( ii );
Serial.print( " val=" );
}
Serial.print( pinLast[ii] );
Serial.print(',');
}
Serial.println();
Serial.println();
while ( 1 ) {
uint32_t jj, dd = 0, cc = 0;
cc = 0;
for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
jj = digitalReadFast( ii );
if ( jj != pinLast[ii] ) {
dd = 1;
cc++;
pinLast[ii] = jj;
Serial.print("d#=");
Serial.print( ii );
if ( pinLast[ii] ) Serial.print( "\t" );
Serial.print( " val=" );
Serial.print( pinLast[ii] );
Serial.print(',');
}
if ( cc > 1 ) {
Serial.println(">>>");
}
if ( Serial.available() ) {
while ( Serial.available() ) Serial.read();
if ( 0 == SET ) {
SET = 1;
Serial.print("PULLUP :: TEST TO GND\n ");
}
else {
SET = 0;
Serial.print("PULLDOWN :: TEST to 3.3V\n ");
}
for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
if ( 0 == SET )
pinMode( ii, INPUT_PULLDOWN );
else
pinMode( ii, INPUT_PULLUP );
delayMicroseconds( 20 );
pinLast[ii] = digitalReadFast( ii );
if (SET != pinLast[ii]) {
Serial.print("d#=");
Serial.print( ii );
Serial.print( " val=" );
Serial.println( pinLast[ii] );
}
}
}
}
if ( dd ) {
dd = 0;
Serial.println();
delay( 50 );
}
}
}
It gives a static reading of the pins in Pull Up or Pull Down when that 'test mode' is entered.
Ideally with nothing connected all pins should show 0 on PULL DOWN and 1 on PULL UP, when things are connected, or there are issues they will print the pin number for unexpected values.
[U]The SerMon displayed notes: "PULLDOWN :: TEST to 3.3V" and "PULLUP :: TEST TO GND"[/U]
Are for dynamic testing as noted use a WIRE either at 3.3V or GND and [B][U][COLOR="#FF0000"]carefully[/COLOR][/U][/B] touch the other 'testable' pins and they will show a change by number.
Touching a Single pin as indicated should only change a single pin (otherwise it is a short to any other changing pins) and a single pin change should be as expected transitioning 0>1 or 1>0 depending on the test.
#include "T4_PowerButton.h"
void myCallback(void) {
digitalWriteFast( 13, 1);
[B] Serial.print(" RESTART Teensy ...");
delay(100);
SCB_AIRCR = 0x05FA0004;
delay(100);[/B]
}
void setup() {
Serial.begin(115200);
while (!Serial && millis() < 4000 );
if (arm_power_button_pressed()) {
Serial.println("Restart after power down");
} else {
Serial.println("First power on");
}
pinMode(13, OUTPUT);
set_arm_power_button_callback(&myCallback); //Start callback
}
void loop() {
digitalWriteFast( 13, !digitalReadFast(13));
delay(100);
}
Also finding PIN 22 is showing "HELD HIGH" When MM_T is on either Machine Learn or ATP carrier
> That pin does not show on edge (or in @KurtE notes above?) , not sure where it is connected?
UART_RTS1 O UART ready to send. 3.3V
UART_CTS1 I UART clear to send. 3.3V
SD SDIO breakout board
Got curious and found that Adafruit actually one: https://www.adafruit.com/product/4682. It also has a Detect pin that we can have some fun with
View attachment 24264
Going to be interesting to see if it works.
Morning @KurtE
Neither do I that why when I saw it on the schematic as not connected I got confused.
Anyway - there are probably a few places where we used ARDUINO_TEENSY40/TEENSY41 vs __IMXRT1062_ . Think in our display libraries with just used IMXRT1062 as well as in SPI.
// Now validate the pins
if (spi_port->pinIsMOSI(_mosi) && spi_port->pinIsSCK(_sclk)) {
//spi_port= &SPI;
if(!(spi_port->pinIsMISO(_miso))) {
_miso = 0xff; // set miso to 255 as flag it is bad
#if defined([COLOR="#FF0000"]ARDUINO_TEENSY41[/COLOR])
const SPIClass::SPI_Hardware_t SPIClass::spiclass_lpspi1_hardware = {
CCM_CCGR1, CCM_CCGR1_LPSPI1(CCM_CCGR_ON),
DMAMUX_SOURCE_LPSPI1_TX, DMAMUX_SOURCE_LPSPI1_RX, _spi_dma_rxISR1,
42, 54,
4 | 0x10, 3 | 0x10,
1, 0,
IOMUXC_LPSPI1_SDI_SELECT_INPUT,
43, 50,
4 | 0x10, 3 | 0x10,
1, 0,
IOMUXC_LPSPI1_SDO_SELECT_INPUT,
45, 49,
4 | 0x10, 3 | 0x10,
1, 0,
IOMUXC_LPSPI1_SCK_SELECT_INPUT,
44, 255, 255,
4 | 0x10, 0, 0,
1, 0, 0,
0, 0, 0,
&IOMUXC_LPSPI1_PCS0_SELECT_INPUT, 0, 0
};
#else
const SPIClass::SPI_Hardware_t SPIClass::spiclass_lpspi1_hardware = {
CCM_CCGR1, CCM_CCGR1_LPSPI1(CCM_CCGR_ON),
DMAMUX_SOURCE_LPSPI1_TX, DMAMUX_SOURCE_LPSPI1_RX, _spi_dma_rxISR1,
34,
4 | 0x10,
1,
IOMUXC_LPSPI1_SDI_SELECT_INPUT,
35,
4 | 0x10,
1,
IOMUXC_LPSPI1_SDO_SELECT_INPUT,
37,
4 | 0x10,
1,
IOMUXC_LPSPI1_SCK_SELECT_INPUT,
36,
4 | 0x10,
1,
0,
&IOMUXC_LPSPI1_PCS0_SELECT_INPUT
};
#endif
Agree. But no such luck. Have a feeling they were trying to keep carrier boards small and focused. But don't think it would have taken much to add in the camera to the ATP board. Since Adafruit ships from NY which is not far from me, should have it tomorrow, I hope. Reason I got it is that I didn't want to have to keep switching boards.Yep - May order one at some point, not sure where yet, looks like digikey has them... Can always test the boards SDIO with the data logger board or the machine learning board.
however the interesting thing with debugging some of the stuff on their boards could be challenging. That is for example the camera, not sure where or how will hook up Logic Analyzer to check out the signals.
Wish they had the Kitchen Sink adapter board. One that has: ATP, plus USB, plus SDIO, plus CAMERA, QWIIC
What will be interesting is testing Wire3 pins as we don't have Wire3 on T4 or 4.1...
//#define WIRE_HAS_END 1
#define WIRE_IMPLEMENT_WIRE
#define WIRE_IMPLEMENT_WIRE1
#define WIRE_IMPLEMENT_WIRE2
#if defined(ARDUINO_TEENSY_MICROMOD)
#define WIRE_IMPLEMENT_WIRE3
#endif
constexpr TwoWire::I2C_Hardware_t TwoWire::i2c3_hardware = {
CCM_CCGR2, CCM_CCGR2_LPI2C3(CCM_CCGR_ON),
#if defined(ARDUINO_TEENSY41)
{{17, 1 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 2}, {44, 2 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 1}},
{{16, 1 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 2}, {45, 2 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 1}},
#else // T4 and ARDUINO_TEENSY_MICROMOD
{{17, 1 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 2}, {36, 2 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 1}},
{{16, 1 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 2}, {37, 2 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 1}},
#endif
IRQ_LPI2C3
};
TwoWire Wire1(&IMXRT_LPI2C3, TwoWire::i2c3_hardware);
PROGMEM
constexpr TwoWire::I2C_Hardware_t TwoWire::i2c4_hardware = {
CCM_CCGR6, CCM_CCGR6_LPI2C4_SERIAL(CCM_CCGR_ON),
{{25, 0 | 0x10, &IOMUXC_LPI2C4_SDA_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
{{24, 0 | 0x10, &IOMUXC_LPI2C4_SCL_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
IRQ_LPI2C4
};
TwoWire Wire2(&IMXRT_LPI2C4, TwoWire::i2c4_hardware);
#if defined(ARDUINO_TEENSY_MICROMOD)
PROGMEM
constexpr TwoWire::I2C_Hardware_t TwoWire::i2c2_hardware = {
CCM_CCGR2, CCM_CCGR2_LPI2C2(CCM_CCGR_ON),
{{41, 2 | 0x10, &IOMUXC_LPI2C2_SDA_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
{{40, 2 | 0x10, &IOMUXC_LPI2C2_SCL_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
IRQ_LPI2C4
};
TwoWire Wire3(&IMXRT_LPI2C2, TwoWire::i2c2_hardware);
there could maybe be more micromods in different teensies in future? who knows, but make it specific for the 4.x?
Code:#if defined(ARDUINO_TEENSY_MICROMOD) && defined(__IMXRT1062__)