Teensy 3.5 & 3.6 support

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
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Teensy 3.5 & 3.6 support

Post by Roberthh » Thu Dec 01, 2016 8:14 pm

Hello @dhylands. I just stumbled over an issue. When you call

Code: Select all

sys.stdin.read(1)
and push Ctrl-C twice, the device locks up. Id does not matter, if you push the Ctrl-C twice in a row or other characters in between. I know it's WIP, so I just wanted to note,

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Teensy 3.5 & 3.6 support

Post by dhylands » Sun Jan 08, 2017 3:23 am

@roberthh - I fixed the Control-C problem, and I think I found the data loss issue.

I rebased to the latest master (1.8.6) and updated the .hex files.
https://github.com/dhylands/micropython/tree/teensy-usb
https://github.com/dhylands/micropython ... /hex-files

I also put a copy of the hex-files here:
https://www.dropbox.com/sh/ubvenq4onpid ... 7x3aa?dl=0

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

Re: Teensy 3.5 & 3.6 support

Post by Roberthh » Sun Jan 08, 2017 10:33 am

Hello @dhylands, thank you for the update.
I was able to update my local copy of the repository, compiled & load it, and it seems to work.
I just compared the Ctrl-C handling with sys.stdin.read(1) on the various port, and all behave different.
The behavior I like most is that of the ESP8266 port, in that it interrupts your code, if no exception handler is set, and triggers that handler, if set. and all of that on the first Ctrl-C.
Best Regards, Robert

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Teensy 3.5 & 3.6 support

Post by dhylands » Sun Jan 08, 2017 9:57 pm

Roberthh wrote:Hello @dhylands, thank you for the update.
I was able to update my local copy of the repository, compiled & load it, and it seems to work.
I just compared the Ctrl-C handling with sys.stdin.read(1) on the various port, and all behave different.
The behavior I like most is that of the ESP8266 port, in that it interrupts your code, if no exception handler is set, and triggers that handler, if set. and all of that on the first Ctrl-C.
Best Regards, Robert
Currently, that behaviour is determined by code in the stmhal port wihch is shared by the teensy port (so stmhal and teensy both behave the same).

When (softirq's get merged, then I expect we'll see this behaviour become more consistent.

If I had to guess, I would bet that if you called the delay function for several seconds and hit a single Control-C in the middle of the delay, then it won't get processed until the delay actually completes.

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: Teensy 3.5 & 3.6 support

Post by kamikaze » Fri Nov 03, 2017 1:11 am

any progress on this? :roll:

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: Teensy 3.5 & 3.6 support

Post by rcolistete » Sat Dec 28, 2019 1:21 am

I'd like to have I2C working on MicroPython for Teensy 3.2/3.5/3.6.

Anyone currently working on MicroPython for Teensy 3.2/3.5/3.6 or even 4.0 ?

I can try to help developing I2C with some spare time in January, if guided by a more experient developer.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: Teensy 3.5 & 3.6 support

Post by rcolistete » Sat Jan 18, 2020 4:41 pm

Branch teensy-rtc from dhylands/micropython repository seems to be the newest MicroPython code for Teensy 3.1/3.2/3.5/3.6, with good documentation of the machine functions :
https://github.com/dhylands/micropython ... ine-module
It has ADC, RTC (+ time module), SD (Teensy 3.5/3.6), rng (Teensy 3.5/3.6), USB_VCP, etc.

The .hex firmware files in :
https://github.com/dhylands/micropython ... /hex-files
are from 20170107, not updated with commits from teensy-rtc, so they lack RTC and time modules.

To have the firmware with RTC (+ time module), compile :

Code: Select all

$ git clone https://github.com/dhylands/micropython.git
$ cd micropython
$ git checkout teensy-rtc
$ cd teensy
$ make BOARD=TEENSY_3.1
$ make BOARD=TEENSY_3.5
$ make BOARD=TEENSY_3.6
PS: dhylands, feel free to comment.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

Post Reply