Skip to content
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

Flashing v2 via WebUSB restarts micro:bit twice #3418

Closed
abchatra opened this issue Oct 13, 2020 · 3 comments
Closed

Flashing v2 via WebUSB restarts micro:bit twice #3418

abchatra opened this issue Oct 13, 2020 · 3 comments

Comments

@abchatra
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://makecode.microbit.org/beta?compile=multiVariant#editor'
  2. make a sound or on start https://makecode.microbit.org/_Ld8Ezr7rYMKD demos this well
  3. Flash via webUSB to v2 micro:bit
  4. Program starts twice so tone is heard twice

Expected behavior
micro:bit only resets once.

This does not reproduce with v1 board. Could it be a DAPLink issue?

We are not having this issue with the Python Editor WebUSB implementation, so while I wouldn't discard an issue with DAPLink, it's worth looking into MakeCode first.

In case it helps, see
microbit-foundation/codal-microbit#89 (comment)
"After a USB flash... The bootloader is rebooting once before the application runs. I'm not sure if the reboot happens when there is no display. I'm pretty sure the bootloader is not rebooting on purpose, just that the first jump to 0x27000 ends up running the bootloader again."

This seems to reproduce for any program, whether we use the display or not. I can confirm it does not happen in the Python Eidtor when using webUSB

@abchatra
Copy link
Contributor Author

@mmoskal
Copy link
Member

mmoskal commented Oct 27, 2020

this is due to microbit-foundation/DAPLink#6

as a workaround, we could only set the baud rate once per session

@pelikhan
Copy link
Member

We don't disconnect from DAPLink anymore; so we reset once when connecting to DALLink to set the baud rate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants