Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Full System Lockup When Using embassy-usb Driver with RTT #3849

Open
gmarino2048 opened this issue Feb 4, 2025 · 1 comment
Open

Full System Lockup When Using embassy-usb Driver with RTT #3849

gmarino2048 opened this issue Feb 4, 2025 · 1 comment

Comments

@gmarino2048
Copy link

System Info:

  • Chip: STM32U575ZIT6Q
  • embassy-stm32 Version: 0.2.0
  • embassy-usb Version: 0.4.0
  • defmt Version: 0.3.10
  • defmt-rtt Version: 0.4.1

embassy-stm32 Features:

  • time-driver-any
  • defmt
  • stm32u575zi
  • memory-x
  • exti

embassy-usb Features:

  • defmt

While configuring the USB driver using the InterruptExecutor model for multipriority execution, I noticed that the chip will lock up completely when the USB cable is inserted. The defmt trace logs from the device initialization appear to overwhelm the RTT buffer and cause a malfunction. I'll attach the full logs to this issue, but here are the final few lines (worth mentioning that it does always seem to fail at the same place):

<time> [TRACE] === status 01ec0080
<time> [TRACE] SETUP_DATA_RX
<time> [TRACE] === status 01e80000
<time> [TRACE] SETUP_DATA_DONE ep=0
<time> [TRACE] irq
<time> [TRACE] oepint
 WARN probe_rs::session: Could not clear all hardware breakpoints: An ARM specific error occurred.

Caused by:
    0: The debug probe encountered an error.
    1: An error which is specific to the debug probe in use occurred.
    2: USB error.
    3: timed out
 WARN probe_rs::session: Failed to deconfigure device during shutdown: Arm(Probe(ProbeSpecific(BoxedProbeError(Usb(Kind(TimedOut))))))
Error: An ARM specific error occurred.

Caused by:
    0: The debug probe encountered an error.
    1: An error which is specific to the debug probe in use occurred.
    2: USB error.
    3: timed out

usb-crash.log

@gmarino2048
Copy link
Author

Doubling DEFMT_RTT_BUFFER_SIZE also seems to fix the issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant