-
Notifications
You must be signed in to change notification settings - Fork 25
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
Device Crashes when Host Device goes to sleep/powers down #23
Comments
Does it crash immediately when the host device goes to sleep or powers off? or only when you press a button that is attempting to send shortcut keys to the host system? Or some other time? |
It crashes almost instantly. No interaction is required. I haven't tested
if interaction makes it crash sooner.
…On Mon, Aug 9, 2021, 4:10 PM foamyguy ***@***.***> wrote:
Does it crash immediately when the host device goes to sleep or powers
off? or only when you press a button that is attempting to send shortcut
keys to the host system? Or some other time?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANO2MEOEIDTTVJLNCEFSXLT4AYZZANCNFSM5B2TUAGQ>
.
|
Can you post the full stack trace that you're seeing? I'm curious to see which lines are initially raising the error. |
Still trying to find a good way to dump the trace as it's when the host is
powered down. Any ideas are welcome.
…On Mon, Aug 9, 2021, 10:26 PM foamyguy ***@***.***> wrote:
Can you post the full stack trace that you're seeing? I'm curious to see
which lines are initially raising the error.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANO2MFW2GGNPX5KL5OOIJDT4CE7FANCNFSM5B2TUAGQ>
.
|
So, after MUCH tracing, looks like the issue is with a |
|
Yep, but that's what's crashing when the host is disconnected(IE, shutdown). |
maybe this could help, hathach/tinyusb#1020 would you mind switching the lib/tinyusb to branch to tes with https://github.com/hathach/tinyusb/tree/rp2040-disconnect-suspend |
this is fascinating because I'd like to detect host sleep/powerdown in my code... I tried finding the right place for it in the circuitpython source this morning but had no luck. Right now I'm just doing a timeout based on last interaction. |
This has been folding into TinyUSB, just waiting on news of how its going to be upstream into the main build. Still need details on this will interact with the Macropad. |
Can confirm on most recent firmware that |
I can confirm that changing the library to include a check for usb_connected at the beginning of all the release functions does seem to solve this issue. I put a check for it at the beginning of my main loop to gracefully shut down and stop doing anything that may call one of those functions which works well. |
Is there any update on this bug? I am currently using the Macropad as a boot device to assist some boot time processes and in between bit locker and windows, If any key is pressed the board crashes. |
I haven't seen this in a while. I would imagine that a new CircuitPython version sometime in the last year probably incorporated the fix. |
So, odd bug: the device will crash when the host goes into sleep/powers down.
The Display reads "USBerror: USB busy". Doesn't matter if USB memory is set to readonly or not, if usb_cdc is enabled, etc. It seems that any interactions with memory in the main loop while the Host device is in these power states causes the USB issue.
Code can be found here: https://github.com/LibertyBeta/macro_pady
The text was updated successfully, but these errors were encountered: