Teensy 4.0 & 4.1

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
User avatar
Mike Teachman
Posts: 155
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Re: Teensy 4.0 & 4.1

Post by Mike Teachman » Mon Jan 24, 2022 4:05 pm

Some potentially good news about using I2S with the MIMXRT1060 evaluation board -- I downloaded the schematic for the MIMXRT1060-EVKB and found a connector (J23) that brings out the I2S audio signals from the processor. This suggests that low cost and simple I2S DACs and I2S microphones can be used with the MIMXRT1060-EVKB. The other mimxrt development boards do not appear to have this connector. These simple I2S devices do not require a MCLK signal and they do not require a python driver (see the micropython-i2s-examples repo for a list of these devices). If I am correct in reading the schematic, it means that the mimxrt machine_I2S implementation will work with this evaluation board. The file, mpconfigboard.h, would need to be updated to enable I2S and map the I2S pins for the MIMXRT1060-EVKB. An example for the Teensy is here

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Teensy 4.0 & 4.1

Post by Roberthh » Mon Jan 24, 2022 4:30 pm

If you look into the boards/MIMXRT10xx_AF.csv files, you see the pins that carry the SAI signals. If you compare that to the boards/MIMXRT10xx_EVK/pins.csv files, you can tell if these SAI signals are available at the connector. If yes, then an external board can be connected. J23 on the MIMXRT1060_EVK board is one of the Arduino compatible connectors. The same should be on the MIMXRT1050_EVK and MIMXRT1064_EVK boards. It is possible that at least one of the two or three SAI devices of the MCU is accessible at these connectors.

And if course, in any case the mpconfigboard.h files have to be adapted. And anyhow, the on-board codec should be accessible. So at least the interface has to be defined in the mpconfigboard.h.

P.S.: We do not have a MIMXRT1060:_EVK board available, but I have a MIMXRT1050 board.

Edit: As far as I can tell, only two signals of SAI1 are accessible at J23, RX_SYNC and RX_BCLK

User avatar
Mike Teachman
Posts: 155
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Re: Teensy 4.0 & 4.1

Post by Mike Teachman » Mon Jan 24, 2022 5:23 pm

I just discovered that there are two versions of the MIMXRT1060-EVK board, called MIMXRT1060-EVK, MIMXRT1060-EVKB. The "B" version includes the audio connector that carries the I2S signals from the processor. On the "B" version, the 4 Arduino connectors are identified as J16, J17, J32, and J33. The audio connector, called "AUDIO MAIN CONN", is identified as J23.

On the MIMXRT1060-EVK board version, J23 is one of the 4 Arduino connectors.

Here is the download link that shows both boards versions:
https://www.nxp.com/design/development- ... RT1060-EVK

If you are thinking of purchasing a MIMXRT1060 evaluation board make sure to buy the B version

alphaFred
Posts: 31
Joined: Wed Apr 15, 2020 6:47 pm

Re: Teensy 4.0 & 4.1

Post by alphaFred » Mon Jan 24, 2022 5:31 pm

The B revision strikes again. We already discovered that with the 1050s. I guess I will make a note to check the layout and add it to our boards. There are maybe more differences in the pinout.

If I understand correctly Mike you own a B revision 1060 board?

User avatar
Mike Teachman
Posts: 155
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Re: Teensy 4.0 & 4.1

Post by Mike Teachman » Mon Jan 24, 2022 5:49 pm

I don't have any of the eval boards. I developed the mimxrt I2S feature using the Teensy 4.1

alphaFred
Posts: 31
Joined: Wed Apr 15, 2020 6:47 pm

Re: Teensy 4.0 & 4.1

Post by alphaFred » Mon Jan 24, 2022 5:57 pm

Ok sorry - my bad.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Teensy 4.0 & 4.1

Post by Roberthh » Mon Jan 24, 2022 6:29 pm

When I searched for the boards about 6 months ago, there existed a MIMXRT1050_EVKB board, and some source mentioned a MIMXRT1060_EVKB board, but nothing official. And a few weeks ago, it was not available. Now Mouser lists it, and it is definitely a different board.
Edit: Looking at the schematics, there are jumpers to disconnect the build-on WM8960.

andyy
Posts: 3
Joined: Sat Jan 22, 2022 1:38 pm

Re: Teensy 4.0 & 4.1

Post by andyy » Fri Jan 28, 2022 7:59 pm

Hello Robert,
thank you very much for the support regarding the quadratur encoder. It works as expected. I only had some trouble with git und ulab, so I had to dive deeper in these two topics, before I could give it a try.

User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: Teensy 4.0 & 4.1

Post by rdagger » Sat Feb 05, 2022 8:29 pm

I picked up a Teensy 4.0 and Teensy Audio Adapter board. The audio adapter is based on the SGTL5000. The SGTL5000 is a very powerful I2S stereo codec /amp with input, output and digital processing. I’m attempting to port some of the PRJC audio library to MicroPython and I have a few questions:
  • Does MicroPython I2S support slave mode? The SGTL5000 supports both master and slave but I think the PLL only works if it is run as the master. So precise clocking could be an issue at 11.2896 MHz or 12.288 MHz
  • Does MicroPython I2S support both input and output in the same application?
  • Is the Teensy I2S implementation ready? If not, what MicroPython board would work best in the interim?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Teensy 4.0 & 4.1

Post by Roberthh » Sat Feb 05, 2022 9:17 pm

Mike Teachman is almost finished with implementing I2S support for the MIXRT port including Teensy 4.x. At the moment Mike adda support for the Teensy audio port with the sgtl5000 chip, and we test different configurations and MIMXRT boards. Simpler chips like the UDA1334 or PCM5102 are already supported. SGTL5000 will take another week or so. It requires a complex configuration script for setting the various modes. I try to give some answer to your question:
  • The MIMXRT I2S controller supports both master and slave mode. But we prefer to run the controller as master and the codec as slave.
  • The planned interface is the same as for e.g. the RPI Pico port. So, AFAIK, there is no support for simultaneous Input and Output to the same codec, even if the controller could handle this.
  • The implementation is quite evolved. Since it matches e.g. the RPi Pico port, you could use that board. But you would still need a Python script to configure the SGTL5000.

Post Reply