-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Labels
kint41kinT with the Teensy 4.1kinT with the Teensy 4.1
Description
Status
- milestone: light up LED
- milestone: print debug messages on the serial port
- milestone: light up a LED from ChibiOS
- milestone: print debug messages on the serial port from ChibiOS
- ChibiOS tests are passing successfully!
- milestone: USB stack used successfully from ChibiOS
USB
- the Teensy 4.1 has two USB 2.0 OTG controllers
- I’m trying to make controller
USB1(base address0x402E0000) work (eval board: the USB port right next to the ethernet port, called “USB OTG” in the documentation, teensy 4.1: the main and only USB port) - There are 5 different USB implementations I know of:
- NXP SDK (usb_device_dci.c)
- supports KHCI (USB Full Speed)
- supports EHCI (USB High speed, what the Teensy 4.1 uses)
- supports LPC USB IP3511 FS
- supports LPC USB IP3511 HS
- Paul Stoffregen’s official Arduino Teensy 4 core (usb.c)
- Uses the EHCI interface, but also uses the teensy register macros, not NXP’s CMSIS.
- ChibiOS-Contrib Kinetis (hal_usb_lld.c)
- The KINETIS hal_usb_lld.c uses the KHCI interface, which is not available on the Teensy 4.1 anymore.
- Maybe we need to create a hal_usb_lld.c that uses the EHCI interface.
- The stack in libgreat is more readable/descriptive, but not 100% sure about correctness—might be better to prefer the NXP stack for now.
- Tamago’s USB stack: https://github.com/f-secure-foundry/tamago/tree/master/soc/imx6/usb
- NXP SDK (usb_device_dci.c)
Building
- You need ChibiOS/ChibiOS@3249070 or newer (fixes the interrupt vector table alignment for teensy 4.1)
- My ChibiOS-Contrib WIP branch can be found at https://github.com/stapelberg/ChibiOS-Contrib/commits/teensy41
Wiring/testing
- Connect a USB-to-serial adapter to teensy 4.1 pins G (GND), 16 (RX) and 17 (TX).
- Build and flash the ChibiOS-Contrib teensy 4.1 demo:
cd ChibiOS-Contrib/demos/MIMXRT1062/RT-TEENSY4_1 make teensy-loader-cli -w -v --mcu=TEENSY40 build/ch.hex - After turning on the teensy 4.1, you should see debug messages on the serial console, followed by the ChibiOS test suites.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kint41kinT with the Teensy 4.1kinT with the Teensy 4.1