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

STM32: panic when initializing USB ULPI #2973

Closed
mattico opened this issue May 20, 2024 · 1 comment
Closed

STM32: panic when initializing USB ULPI #2973

mattico opened this issue May 20, 2024 · 1 comment

Comments

@mattico
Copy link
Contributor

mattico commented May 20, 2024

The panic occurs here:

let freq = T::frequency();

I think this is because the ULPI PHY provides the 48MHz clock, so the internal 48MHz clock isn't enabled. It may be due to some other initialization registers which need to be set for ULPI.

I will likely investigate tomorrow.

@mattico
Copy link
Contributor Author

mattico commented May 21, 2024

I forgot to configure the usb clock mux after I updated embassy.

It seems obvious now, but it was difficult to root cause because the panic message's line info would often just point to fmt.rs or sometimes _generated::{impl#140}::frequency() which wasn't super helpful. It would be nice if the panic message would say "configure config.rcc.mux.usbsel" rather than just "unreachable".

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

1 participant