DAPLink icon indicating copy to clipboard operation
DAPLink copied to clipboard

LED activity during WebUSB DAPJs flashing doesn't blink in 0254

Open microbit-carlos opened this issue 4 years ago • 6 comments

Raising this issue here as the same version of DAPJs works fine with DAPLink 0253, but doesn't with 0254, but maybe this issue has to be transferred.

Basically, flashing with DAPJs via WebUSB is meant to blink the DAPLink LED, and this stopped working with DAPLink 0254.

Can be replicated using the DAPJs demo and a micro:bit board:

microbit-carlos avatar Jun 02 '20 15:06 microbit-carlos

@thegecko tagging you to this ticket for visibility, as I am still not quite sure if this is a fix in DAPJs or DAPLink.

microbit-carlos avatar Jun 02 '20 15:06 microbit-carlos

Quick note to add that serial activity via WebUSB doesn't blink the LED either in 0254.

microbit-carlos avatar Aug 10 '20 16:08 microbit-carlos

I agree this sounds like a DAPLink issue, with your repro steps it should really help tie down the change which introduced this regression

thegecko avatar Aug 11 '20 08:08 thegecko

Also worth mentioning we use the latest DAPjs with older DAPLink firmware and don't see this issue.

thegecko avatar Sep 30 '20 17:09 thegecko

@flit a partial fix for this issue when WebUSB flashing was included as part of PR #763 in this commit: https://github.com/ARMmbed/DAPLink/pull/763/commits/e4e9b2d8b8fcc711fcfe9c4858701548643c825f

However, the LED still doesn't blink during "partial flashing". In the MakeCode and Python editor we use DAPJs with WebUSB CMSIS-DAP to manually erase/flash specific pages to update the user code only (JS code here). With older versions of DAPLink the LED would flash during partial flashing as well, but it currently doesn't.

microbit-carlos avatar Mar 25 '21 10:03 microbit-carlos

The issue is that the call to blink the "HID" LED is missing from the CMSIS-DAP v2 bulk interface handler.

https://github.com/ARMmbed/DAPLink/blob/78c51931f2058e72f5f95ec03c5299a6ff2bdde0/source/usb/bulk/usbd_bulk.c#L78-L84

flit avatar Jun 28 '21 17:06 flit

This can be closed as fixed in https://github.com/ARMmbed/DAPLink/pull/1008 and refined in https://github.com/ARMmbed/DAPLink/pull/1019/

microbit-carlos avatar Apr 19 '24 12:04 microbit-carlos