-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Board Teensy 3.1 3.5 3.6
Cortex M4 based
Note: Some of the following instructions require using Dave Hylands' micropython repository as some functionality has not been merged in micropython (see: #2513 #2519 #2520).
- MK20DX256VLH7 72MHz
- 256K Flash, 64kB RAM
- 34 pins available for digitial I/O
- 21 pins availale for analog 16-bit A/D
- 12 timers, 12 PWM
- 3xUART
- SPI, I2C, CAN
- MK64FX512VMD12 120 MHz
- 512K flash,
- 57 pins available for digital I/O (5v tolerant)
- 24 pins available for analog 13-bit A/D
- 14 timers, 20 PWM
- 6xUART
- 3xSPI, 3xI2C, 1xCAN, 16xDMA
- RTC
- 2 DAC channels
- SD card
- MK64FX512VMD12 180 MHz
- 1M flash, 256K RAM, 4K EEPROM
- 57 pins available for digital I/O (NOT 5v tolerant)
- 26 pins available for analog 13-bit A/D
- USB High Speed OTG port
- 14 timers, 22 PWM
- 6xUART
- 3xSPI, 4xI2C, 2xCAN, 32xDMA
- RTC
- 2 DAC channels
- SD card
To build, you can either use the ARM toolchain from here (add to your PATH), or you can use the ARM toolchain included with Arduino/Teensyduino (set ARDUINO environment variable to point to the root of your arduino/teensyduino tree).
git clone https://github.com/micropython/micropython
cd micropython/ports/teensy
make BOARD=TEENSY_3.1
BOARD can be one of TEENSY_3.1, TEENSY_3.5, or TEENSY_3.6. If no BOARD is specified, then TEENSY_3.1 will be assumed.
The firmware will be in build-TEENSY_3.1/micropython.hex (replace TEENSY_3.1 appropriately).
You can flash using teensy_loader_cli or by using the flashing tools included with teensyduino but setting ARDUINO to point to the arduino/teensyduino tree.
make BOARD=TEENSY_3.6 deploy
Currently, scripts must be compiled into the firmware image. Place your .py files into the teensy/scripts directory and they'll be built into your firmware image.
The sample scripts directory includes a boot.py and main.py. The default main.py flashes the LED twice.
If you want to update a script, you'll need to rebuild and reflash the firmware.
- machine.info()
- machine.unique_id()
- machine.reset()
- machine.freq()
- machine.idle()
- machine.sleep()
- machine.deepsleep()
- machine.reset_cause()
- machine.disable_irq()
- machine.enable_irq()
- machine.mem8/16/32[]
- machine.Pin
- machine.Timer
- machine.UART
- machine.SD