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

[usb][rtl872x] Resolves deadlocks on boot with usbd_isr_ and app threads #2765

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

scott-brust
Copy link
Member

Problem

MSOM devices deadlock when a USB serial terminal is left connected to them on boot. Examples are when doing DFU flashing via command line / workbench with either minicom or particle serial monitor running.

Solution

This PR avoids a lock between the app thread and the USB ISR thread that happens early on boot when attempting to log before system thread is started. See discussion here

Steps to Test

Connect minicom / particle serial monitor to follow a device.
Flash via DFU / workbench
USB serial should re-enumerate when the device boots and runs

Example App

Any

@scott-brust scott-brust added this to the 5.8.1 milestone Apr 22, 2024
@scott-brust scott-brust marked this pull request as ready for review April 22, 2024 22:30
@scott-brust scott-brust merged commit e565422 into develop Apr 22, 2024
13 checks passed
@scott-brust scott-brust deleted the remove-usb-wrap-read-packet-lock branch April 22, 2024 23:26
@scott-brust scott-brust mentioned this pull request Apr 23, 2024
@scott-brust scott-brust mentioned this pull request Jul 2, 2024
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

Successfully merging this pull request may close these issues.

3 participants