-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CFG_TUSB_DEBUG=2 Serial1 deadlock on nRF52 #2649
Comments
Hi, your issue involved Arduino which isn't covered by this repo. Please try to reproduce with stock examples: |
You might be correct that it's limited to the Arduino library. However, upon investigating a bit more, it seems that Is the The nRF52 Arduino core seems to have some issues with Examining the state of the FreeRTOS task list suggests that it has gotten corrupted by turning into a loop, possibly due to calling non-ISR synchronization primitives from within an ISR. |
Confirmed that I would still like some clarification about whether |
Yes it should be ISR safe, while documentation is a bit lacking... Meanwhile even for built-in logging interrupt lock is also missing: Line 49 in ccc7a36
|
Operating System
MacOS
Board
Feather nRF52840 Express
Firmware
examples/HID/hid_boot_keyboard
What happened ?
Building the hid_boot_keyboard sketch on nRF52 (tested with Feather nRF52840 Express, but I think ItsyBitsy nRF52840 has the same problem) with debug level 2 and debug port Serial1 (in the Arduino IDE Tools menu) causes an apparent deadlock during TinyUSB initialization.
My current debugging setup (Blackmagic Probe) doesn't have RTOS or threading support, so I can't confirm whether there is another thread that's deadlocking somehow. I can try to get PyOCD on a Pico or something eventually, which should have the thread support, but that might take a while.
This might be a regression in 1.6.1 vs 1.6.0 of the nRF52 core, but I haven't confirmed that yet.
How to reproduce ?
Install Adafruit_nRF52_Arduino 1.6.1 in the Arduino IDE. Select Debug Level 2 and Debug Port Serial1. Compile and upload the hid_boot_keyboard sketch. Monitor Serial1 during boot, and observe that the debug output halts before the host enumerates the board.
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
Debug output on Serial1
Backtrace in GDB:
The normal debug trace (via SEGGER RTT) on this host continues with:
etc.
I had to fix a few bugs in the SEGGER RTT support to get that to work.
Screenshots
No response
I have checked existing issues, dicussion and documentation
The text was updated successfully, but these errors were encountered: