After loading current master to pca10056 board (via MSC! ) control-C does not break out of a while True: loop
>>> while True:
... pass
...
...
...
cannot break out with control- c
Same result with a while loop in a script:
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.P0_13)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = True
time.sleep(0.5)
led.value = False
time.sleep(0.5)
Blink works fine, but can't break out
Control-C does work OK at the REPL just to clear input.
Any hunches @hathach before I dive in too deep? ;)
quick check on linux with minicom does seems to work. @jerryneedell which OS and terminal you are using
Adafruit CircuitPython 3.0.0-rc.0-148-gbfe14ff-dirty on 2018-07-13; PCA10056 with nRF52840
>>>
>>> while True:
... pass
...
>>> 1+1
I'm also using Linux (Mint) and minicom and it doesn't work for me either :/
I am using screen in Linux Ubuntu 16.04
I am on ubuntu 16.04 as well. Let's me test with screen
PS: That is lots of Linux :D
I tried minicom under Ubuntu 16.04 and it did not work for me. :-(
Hmm, screen works with me if I just typed the above while True: then press Ctrl +C. Thing is getting werid !!!
Though if I go into paste mode and execute, I couldn't Ctrl+C to terminate it anymore. Is it standard behavior or bug as well
PS: I also find out a bug with paste mode, where some character is missing as well. Working on the fix for that
@hathach did you enter enough "returns" to get into the While loop? I thought 3 were needed after the pass
or even 4
@jerryneedell ah I see, after the 4th CR, it is hanged there. Sorry, I am not familiar with cp at all :( . Let's me check, may be while the loop() is runing ,and the background task that handle usb transfer is not executed.
Whew! Glad we are all seeing the same thing -- thanks!
@hathach,
PS: I also find out a bug with paste mode, where some character is missing as well. Working on the fix for that
We had a similar problem in SAMD land. Here was the fix:
https://github.com/adafruit/circuitpython/pull/698
Mention it as a possible place to look.
Update: got it, the usb cdc doesn't scan and call mp_keyboard_interrupt() by now. Will try to find a way to add it in.
@sommersoft ah thanks, that will be very helpful :D
Most helpful comment
@jerryneedell ah I see, after the 4th CR, it is hanged there. Sorry, I am not familiar with cp at all :( . Let's me check, may be while the loop() is runing ,and the background task that handle usb transfer is not executed.