Page 15 of 30

Re: Teensy 4.0 & 4.1

Posted: Sat Oct 09, 2021 7:02 am
by Roberthh
I just checked whether the serial load method is suitable for Teensy 4.x. It is not. GPIO_AD_B0_05 is tied to GND.

Re: Teensy 4.0 & 4.1

Posted: Sat Oct 09, 2021 9:18 am
by Roberthh
To enter serial download mode the pin GPIO_AD_B0_05 has to be set high, all other mode switches low.
I just tried that on the ARC MiX board using Debian Linux. Something that puzzled me when looking at the schematics is, that GPIO_AD_B0_05 is connected to the 3/6 position of the DIP switch, not the 4/5. But the 3/6 position has to be set for QSPI boot. Setting the 4/5 position allows to download the bootloader, but the schematics show them as connected to GPIO_AD_B0_04. That matches the Reference Manual.
Anyway, Serial Flash did only work, when using sudo. So I have to set the udev rules accordingly.
So, it is surely an alternative way of downloading firmware to the ARCH MIX board, if there is no J-Tag downloader at hand. For MIMXRT and Teensy boards, there is convenient flash support already provided.

Re: Teensy 4.0 & 4.1

Posted: Sat Oct 09, 2021 9:27 am
by loboris
Roberthh wrote:
Sat Oct 09, 2021 9:18 am
I just tried that on the ARC MiX board using Debian Linux. Something that puzzled me when looking at the schematics is, that GPIO_AD_B0_05 is connected to the 3/6 position of the DIP switch, not the 4/5. But the 3/6 position has to be set for QSPI boot. Setting the 4/5 position allows to download the bootloader, but the schematics show them as connected to GPIO_AD_B0_04. That matches the Reference Manual.
Anyway, Serial Flash did only work, when using sudo. So I have to set the udev rules accordingly.
So, it is surely an alternative way of downloading firmware to the ARCH MIX board, if there is no J-Tag downloader at hand. For MIMXRT and Teensy boards, there is convenient flash support already provided.
Sorry, it was my mistake. The pin for mode[0] is GPIO_AD_B0_04 as you noticed.

Re: Teensy 4.0 & 4.1

Posted: Mon Oct 11, 2021 8:31 am
by Roberthh
@loboris I made the board files for the SOM Vision carrier board. Maybe you could try the, It contains the Pin definitions for the Arduino and RPi header. Unfortunately, no hardware SPI pins are routed to these headers. So there is not hardware SPI then. It may be better to define the SODIMM pins instead.
SOM_VISION.zip
(3.54 KiB) Downloaded 197 times

Re: Teensy 4.0 & 4.1

Posted: Mon Oct 11, 2021 10:30 am
by Roberthh
@loboris: I update pins.csv to include the S0DIMM pins as well.
SOM_VISION.zip
(19.53 KiB) Downloaded 201 times

Re: Teensy 4.0 & 4.1

Posted: Mon Oct 11, 2021 11:31 am
by loboris
@Roberthh Thanks for the effort.
The SomLabs carrier board is not a best example of a general purpose development board, it is more oriented to demonstrate some capabilities of the module.
It is expected that the module user will develop own PCB. In that case, if using MicroPython, the new board definition needs to be created.
It is probably the best to use SODIMM pins.
I think the SPI pins on carrier board are connected to LEDS/buttons and the display connector (used as I2C)...

BTW, maybe you cold enable issues in you repo so that some things could be discussed there instead on this forum.

Re: Teensy 4.0 & 4.1

Posted: Mon Oct 11, 2021 11:49 am
by Roberthh
Issues are enabled now.

Re: Teensy 4.0 & 4.1

Posted: Wed Oct 13, 2021 11:42 am
by Roberthh
@loboris I made a PHY driver for the LAN8720 chip and tested it with a WaveShare LAN8720 board. It worked instantly (which means according to Murphy, it has nasty well hidden bugs). The connection is straightforward, with two aspects to take care of when using the Waveshare board:

- the RXER pin of the LAN8720 board is not available. Therefore the ARCH-MIX pin has to be tied to GND, preferably using a resistor. Alternatively, I could be configure that pin with an internal pull-down.
- the Waveshare board creates it own 50MHz clock. It should be possible to disable it by tying the oscillator pin 1 to GND. But that did not succeed. So I changed the code that the ARCH-MIX receives the 50MHz from the 8720 board. That's a setting in mpconfigboard.h. Not connecting the 50Mhz means, that MCU and PHY run at slightly different frequencies 49.997 vs 50.006 MHz in my case), which leads to regular transmission faults. If you use a different board or set-up which needs the 50MHz to be supplied, you have to change or erase that setting in mpconfigboard.h

Version available at the mimxrt_combined repo branch.

Re: Teensy 4.0 & 4.1

Posted: Wed Oct 13, 2021 11:50 am
by loboris
Roberthh wrote:
Wed Oct 13, 2021 11:42 am
@loboris I made a PHY driver for the LAN8720 chip and tested it with a WaveShare LAN8720 board.
Thanks, I have the same lan board (it was used with ESP32, which has the similar issue with 50MHz clock) . I'll test it later today...

Re: Teensy 4.0 & 4.1

Posted: Thu Oct 14, 2021 2:40 pm
by androiddrew
Is there support for CAN Bus in the micropython Teensy 4.x support?