ArduinoCore-samd
ArduinoCore-samd copied to clipboard
Fix bootloader not replying to SAM-BA commands if USB Reset happens
Steps to reproduce:
a) power up the board cold from a separate power supply, b) plug in board to PC with USB cable, run bossac to say to hello to the Arduino; all good so far; c) now unplug and replug the USB cable, while keeping the board powered, d) notice that USB re-enumeration takes place OK, the device is still detected just fine by the PC; e) however, if you now run bossac, it just hangs and gets no reply;
This is because the read_job flag does not get reset back to false when a USB Reset event occurs.