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

Re: Teensy 3.5 & 3.6 support

Postby 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: 2264
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: Teensy 3.5 & 3.6 support

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

Re: Teensy 3.5 & 3.6 support

Postby 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: 2264
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: Teensy 3.5 & 3.6 support

Postby 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.


Return to “Other Boards”

Who is online

Users browsing this forum: No registered users and 1 guest