-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UART does not return to REPL #70
Comments
Removing the from microbit import *
print("this prints normally")
sleep(1000)
uart.init(baudrate=115200,tx=pin0,rx=pin1)
print("this goes to the edge connector pins")
sleep(1000)
uart.init(baudrate=115200)
print("this doesn't print on serial")
sleep(1000) I can replicate this as well in MakeCode (the stable deployment with CODAL 0.2.25): serial.writeLine("this prints normally")
basic.pause(1000)
serial.redirect(SerialPin.P0, SerialPin.P1, BaudRate.BaudRate115200)
serial.writeLine("this goes to the edge connector pins")
basic.pause(1000)
serial.redirect(SerialPin.USB_TX, SerialPin.USB_RX, BaudRate.BaudRate115200)
serial.writeLine("this doesn't print on serial")
basic.pause(1000) @martinwork could you try to create a test in C++ to see if this is reproducible in the CODAL side? If a normal call to micropython-microbit-v2/src/codal_port/microbit_uart.c Lines 86 to 87 in e0f3e60
micropython-microbit-v2/src/codal_app/microbithal.cpp Lines 210 to 221 in b7a76e4
|
@martinwork thanks for looking into this! |
@microbit-carlos I believe that PR on its own should fix this issue, but I haven't tested it in a micropython build. |
This is now waiting on a tag in codal-microbit-v2 |
Latest tagged release is in https://github.com/lancaster-university/codal-microbit-v2/releases/tag/v0.2.26 which I think should resolve this issue. |
Fixed by 291e05c |
micro:bit support: 44148
On v1 program displays 'UART' and returns the string 'done son' in the REPL
on V2 program displays 'UART' but does not return the string 'done son' in the REPL
Tested in https://python.microbit.org/v/beta
Flash the script then open a serial connection. Call the uart_test() function
>>>print(uart_test())
Notice the program works as expected on V1 but hangs V2.
Clicking on on send CTRC-C or CTRL-D does not reset the REPL
The text was updated successfully, but these errors were encountered: