LP-602 fix crashes, reboots and other problems with USB reconnects/replugs

Merged
#518 · Created  · Last updated

Merged pull request

Merged in corvusvcorax/librepilot/LP-602_workaround (pull request #518)

ae1a0e9·Author: ·Closed by: ·2019-02-21

Description

See LP-602 in Jira. USB buffer empty IRQ keeps firing, preventing the board doing anything else and triggering the watchdog whenever USB is replugged while USBHID communication is requested (outgoing buffer filled) but not fully established (not connected) this code change still leaves the USB connection in a degraded state. recovery of communication does not always work, but at least the board no longer reboots.

Additional to the IRQ handler fix which prevents the reboots, this code change also introduces a more elaborate USB stack reset when the USB connection is reset by the host (for example by replugging or reboot). After a full re-enumeration, the error no longer appears and the USB connection is fully functional on both HID and VCP channels.

See comments in code diff for details

0 attachments

0 comments

Loading commits...