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

setting serial speed resets target #6

Open
mmoskal opened this issue Oct 26, 2020 · 5 comments
Open

setting serial speed resets target #6

mmoskal opened this issue Oct 26, 2020 · 5 comments

Comments

@mmoskal
Copy link

mmoskal commented Oct 26, 2020

the Vendor2 command (0x82) which is used to set the line speed also sends a break:

https://github.com/microbit-foundation/DAPLink/blob/master/source/daplink/cmsis-dap/DAP_vendor.c#L93

this resets the target:

https://github.com/microbit-foundation/DAPLink/blob/master/source/daplink/usb2uart/usbd_user_cdc_acm.c#L130

I don't thinks v1 was doing this, and I think this is why makecode resets the board twice while flashing over WebUSB.

cc @jaustin

@microbit-carlos
Copy link
Collaborator

Right, so the code was introduced in version 0251 (https://github.com/microbit-foundation/DAPLink-microbit/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and we shipped v1.5 with 0249.

However we've been putting the newer versions on the website to upgrade not long after each release, so we have users with these versions.

I can replicate the issue in a v1 with 0254 with the current MakeCode beta:

makecode.microbit.org version: 3.0.28
Microsoft MakeCode version: 6.0.24
microbit runtime version: v2.2.0-rc6

@mmoskal
Copy link
Author

mmoskal commented Oct 26, 2020

Do we think it's the right behavior? It seems odd for baud setting to reset board.

@microbit-carlos
Copy link
Collaborator

Yeah, doesn't sound right to reset the target on a baud rate change. We should raise this issue upstream and we can ask Arm if this was an intentional change.

In the meantime the new factory image shipped contains this, and if we want to update the DAPLink factory image I would prefer to do that with an official 0256 release (we don't want to have two different 0255 images in the wild), which might take time since we need to submit the PR upstream and go through the review process to get it merged. So that's not going to be quick.

@microbit-carlos
Copy link
Collaborator

Related issue upstream (thanks for the find @gerargz): ARMmbed#613

@mmoskal
Copy link
Author

mmoskal commented Oct 29, 2020

I think this is orthogonal to the issue that setting baud rate sends break - i don't see why it should

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

No branches or pull requests

2 participants