MicroMod Beta Testing

I don't care much. For beginners kB might be easier to read and does not show a (pseudo-)precision that is not there.


2021-04-01 00_01_05-MicroMod-Teensy.sch - MicroMod_Schematic.pdf.png

So, SF decided to make either camera OR audio possible? Hm?
 
Note: I believe that the current beta has some of the fixes I put in earlier for the different functionality for the different pins:

That is there are 6 new pins:
Micromod new pins
Code:
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

For example:
The Wire library now has a Wire3 object for the two new pins 40 and 41
Also the other Wire2 object has same pins as T4 (as SDIO pins are same as T4 and not T4.1 and does not have bottom memory pins)

The PWM pins were updated SDIO pin numbers plus some new Quad TImers. Some of which are duplicates of other quad time pins.

I probably need to update my own FliexIO pins for the new pins which will be nice. Had some stuff edited on my machine, more for the fact that there are 8 of shifters... not 4... So will play with this one soon.


I have not looked yet to see if enough pins in the LCD_ pins to be used or not.
 
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....

Code:
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)
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 which
 
Last edited by a moderator:
@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

@defragster - thanks for the confirmation and fix - nice to take a nap and wake up to find the fix :)
 
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....

Code:
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)
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 which

I had started the following and I saw your post so I finished it off but I think I got some of the pins wrong - haven't had a chance yet to bounce it against the schematic:

EDIT: UPDATED ATTACHMENT

Think its close but not sure about RTS/CTS pins.Picture2.jpg
 
Last edited:
Nice work Mike - I should fire up PinTest and can ID those two.

BTW - the Beta Teensy MMod arrived today in good shape. GOSH that PCB is THIN!

I got 3 other MCU PCB's and didn't notice how thin as I screwed them in and set them aside the other week.
 
NewPinTest sketch here

Mike: On ATP CARRIER :: CTS and RTS pins show NO CONNECTION
> Explains why they were not found - Pin test cannot find them either.

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?

For this BETA MicroMod_Teensy on ATP Carrier and Machine Learning::
> "BOOT" button does the bootloader "Button" function.
> "RESET" button Power Off/On

Note:
> Machine Learn board has pullups on 18/19 { i2c }
> ATP does not have Pullups on 18/19
> Logger Carrier shows #22 again and these pins HIGH on PullDown Start : 10,18,19,22,41,42

Here for ref : github.com/TeensyUser/doc/tree/master/examples/GPIO/pinList
> is a sketch by @luni that ID's all the pins by # to their GPIO_PORT I just did a PR to include :: || defined (ARDUINO_TEENSY_MICROMOD)

FWIW - a T_4.0 era start on pin checking called "NewPinTest" when a board had some trouble with shorted pins - but never cleaned to be perfect or pretty:
Code:
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 );
    }
  }
}

Directions for USE:
Code:
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.

<edited code to compile on non-1062's : removing a PJRC freq cycle test>
 
Last edited:
RESET with MMod Teensy using On/Off button as RESET

@FrankB - made edits to support MMod and turn off HardFault define: View attachment T4_PowerButton.zip (too late here to do PR or edit)

Using (with #ifdef edits to support ARDUINO_TEENSY_MICROMOD above) :: github.com/FrankBoesing/T4_PowerButton
This quick edit to power.ino changes it to RESET when the power button is pressed : in added ZIP above as added examples reset.ino
Code:
#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);
}
 
Last edited:
@defragster - @KurtE

RTS/CTS not connected - I saw that on the schematic as well but wasn't sure if I was missing something or not. Guess I would have repurposed them. Oh well. With a little luck maybe I will be get mine today instead of tomorrow.
 
@defragster
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?

Pin 22 is identified as BATT_VIN/22/A23 on the T4 schematic = its pin 49 on the M.2 connector - I think if I am reading it right.
 
@Paul
Just pushed a change to the Teensy4 Quad Encoder Library to support the Teensy MicroMod. Warning haven't tested it yet - but will once I get the board which looks like tomorrow
 
My MMOD is in town now at our mail box. Hopefully get there in the next few days... Have a few things going on here at home, so not sure which day.

RTS/CTS - I don't know why they did not bring out some Teensy pins out for these... It is supposed to be for the:
Code:
UART_RTS1 	O 	UART ready to send. 	3.3V
UART_CTS1 	I 	UART clear to send. 	3.3V

Again not sure why they did not give pins for these.
For RTS, this could be any digital pin as we work with it that way.

For CTS - It needs to be a CTS pin for that, which there is only one defined:
LPUART6_CTS_B GPIO_EMC_30 ALT2

Which we have not used on any T4.x yet...

However you can setup a CTS using any available XBAR pin as long as you are not trying to use an XBAR pin for the RX pin of that uart... So they could define
Which reminds me I probably need to double check that table in HardwareSerial.cpp...
I think it is defined the same as T4 which I think we have XBARIO pins of (4-10, 14-17,22, 23)

So could find one of the other XBar pins we have not used...
 
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. If I remember correctly.

I did remember to check QUAD ENCODER lib :). From what I remember of the libs think we primarily used the 1062 ifdef's.
 
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.

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
 
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.

Most of the display libraries that we updated to do things like:


Code:
		// 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
like we did in the ILI9488_t3... I started that in the ILI9341_t3n with SPIN, but then we moved tables over to SPI.

Should probably double check SPI.

I believe in most case it is defined the same as for Teeny 4. That is the tables are defined like:
Code:
#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
I thought I checked the pins that were compatible with the T4s, but should double check again
 
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
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.

Other thing I was thinking about is the temperature profile with this new board. There is not much mass on the MCU board so wondering what the heating profile is going to be. Saw this video from VisualMicro on running the teensy at 1Ghz. Interesting results showing coremarks and temperature profile:

 
Figured I was going to run through our stable of displays and try and hook up the i2c test board we have as a double check. Then fix the libs as appropriately.

I did look at the HX83.. lib and it looked ok, as you said.
 
What will be interesting is testing Wire3 pins as we don't have Wire3 on T4 or 4.1...
 
What will be interesting is testing Wire3 pins as we don't have Wire3 on T4 or 4.1...

Oooh. Missed that - that's your wire? on pins 40 and 41? Is wire3 even defined in wireIMXRT.h? I am getting myself confused again. This is what's in wireIMXRT.h currently:
Code:
//#define WIRE_HAS_END 1
#define WIRE_IMPLEMENT_WIRE
#define WIRE_IMPLEMENT_WIRE1
#define WIRE_IMPLEMENT_WIRE2
So do we need a
Code:
#if defined(ARDUINO_TEENSY_MICROMOD)
#define WIRE_IMPLEMENT_WIRE3
#endif
?

EDIT: Now is this correct as well"
Code:
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);

According to the schematic pins24/25 are wire1 but this is showing Wire2? Or am I missing something
 
Last edited:
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__)
 
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__)

Probably incase they ever go to T3x series or 1170. But think that format is all over right now the place.
 
Back
Top