-
Notifications
You must be signed in to change notification settings - Fork 903
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
SPI1 and USB peripherals conflict in stm32g0b1 #2166
Comments
That is very strange. I don't know what's up, but here are some things you could try that maybe will give us clues:
|
[EDIT update] Thank you, Dario. I will try. About the pin conflict... I think it could be something related to that.
My reference point is https://github.com/embassy-rs/stm32-data-generated/blob/main/data/chips/STM32G0B1RE.json Aditional tests:
2: SPI1 repinning (didn't work)
3: USB from PLLQ.
and then with or without CSR, and finally...
.... I guess I'm not able to tackle or properly understand, because in this case despite of the setup of SPI, USB is not working
|
Updated with findings. No luck so far |
I found couple of details:
Note: My board is an SKR Mini E3 V3. The SPI1 is wired with an SD Card, which is what I'm testing. |
Hello. |
Not an issue in embassy at the end. right? |
Hello.
First of all thank you for this huge contribution.
I'm starting a project leveraging embassy and found an issue with SPI1 and USB in STM32G0B1RETx MCU:
When I enable SPI1, even tough not using it, USB driver gets internally "stall" forever
However:
In order to clearly reproduce and investigate, I just forked and created this branch with your traditional USB example: https://github.com/cbruiz/embassy/tree/stm32g0-usb_spi-rev/examples/stm32g0b1
commit ref: cbruiz@3aa632f
This example has a dummy feature: "enable-spi". When enabled (even though not using SPI1 at all, the issue is always reproduced).
Unfortunately, I run out of ideas about how to deal with it. I wouldn't mind to test or try anything you can suggest. Or maybe it's me that I made a mistake in the RCC config...? (Not an expert, sorry). Thank you in advance.
Demo
With SPI1 -> Fine
I execute the stuff in the device and USB works perfectly.
Log in trace level:
With SPI1 -> USB stalled
I execute the stuff in the device and USB gets stalled at this point in the initialization (if I'm not wrong):
embassy/embassy-stm32/src/usb/usb.rs
Line 697 in b3367be
Log in trace level:
The text was updated successfully, but these errors were encountered: