microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
43 stars 24 forks source link

uart problem #35

Closed crouse12 closed 3 years ago

crouse12 commented 3 years ago

I found that uart in microbit v2 has a problem if I follow the following steps. (1) Connect to microbit v2 by using putty, (2) Reset the microbit v2's power. (3) Connect to microbit v2 by using putty, You can find that microbit v2 cannot work correctly.

https://youtu.be/ZrAsxoCKZTo

dpgeorge commented 3 years ago

Yes I have seen that issue before, that sometimes on initial connection the REPL is not responsive and just returns garbage characters.

@microbit-carlos I'm not sure where the issue lies, maybe with DAP link?

The workaround is to press the reset button on the back of the microbit while it's still connected to putty.

crouse12 commented 3 years ago

Can you clear buffers or session when the Microbit v2 starts?

crouse12 commented 3 years ago

Can anyone help me to solve uart problem?

martinwork commented 3 years ago

Problem exists with a C++ test too.

dpgeorge commented 3 years ago

Problem exists with a C++ test too.

Can you please post C++ code that reproduces it? I guess it's an issue with the CODAL and initialisation of the serial UART?

martinwork commented 3 years ago

@dpgeorge https://github.com/lancaster-university/codal-microbit-v2/issues/45

dpgeorge commented 3 years ago

See also https://github.com/lancaster-university/codal-microbit-v2/issues/55

dpgeorge commented 3 years ago

Fixed by df3caf7176188303686801a1f1fe6e6496d346ad