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

UsbBus constructor implementations can cause MCU faults in --debug run mode #112

Open
ianrmhill opened this issue Mar 13, 2023 · 1 comment

Comments

@ianrmhill
Copy link

When constructing a new UsbBus with usb-device 0.2.9 (atsamd21g implementation running on a SAMD21G17D without compile-time optimizations) fatal CPU errors can arise on the target device.

Likely this is due to stack overflow issues as it occurs while allocating a largish chunk of memory and may be a change more for the atsamd-hal/thumbv6m code that implements the UsbBus, but should check.

Some error and stack trace info:
UsbBusATSAMD21G17DDebugInfo.txt

@ryan-summers
Copy link
Member

Both myself and another Matrix user noted that our projects seemed to freeze up when calling UsbDevice.freeze(). We both were able to resolve it by updating the HAL that we were using to the latest version, and we had the suspicion that this was related to new cortex-m critical-section functionalities. We haven't investigated further, but I wanted to leave this breadcrumb.

This was specifically for STM32F4xx devices

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

No branches or pull requests

2 participants