-
Notifications
You must be signed in to change notification settings - Fork 7.3k
stm32-sdmmc doesn't work when CONFIG_PM is enabled #77526
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
Comments
Hi @bobobo1618! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
I've just had a try on the commit you mentioned on stm32h747i_disco with the following
This should help as a base to investigate the issue you're facing, at least on STM32H7. |
Thanks for investigating! Your log indicates that you're using flash though, not a MicroSD: However I was able to make this example as well as I'll close this for now and reopen if I'm able to write some code to cleanly reproduce the problem. |
I narrowed down the problem to I have a repro branch here where I've modified Output:
|
Oops, my bad. I've forgot there were 2 options to make it work.
Good, let's investigate that. However, I'll move the issue to |
Do I understand correctly that getting this to work with PM would mostly consist of adding device_busy_set and device_busy_clear calls to the relevant places in the stm32 sdmmc driver? Or is there likely to be more to it than that? If it's relatively straightforward, I can take a stab at it. |
|
thank you! @bobobo1618 confirming this is the case on an STM32U575QII6Q based custom board
|
@bobobo1618 Sorry if I'm coming back (very) late on this, but if functional don't hesitate to contribute your change upstream. |
Describe the bug
Attempts to use
stm32-sdmmc
in various ways have failed.To Reproduce
Note that the Adafruit module includes decoupling capacitors for power and 47kΩ pullups on all data lines.
sdmmc1
node in Device Tree like so:Expected behavior
Mount, reads and writes should all work without any problems.
Impact
Showstopper for me for the STM32 series, works fine on other MCUs/boards (e.g. ATSAMD21 via SPI, LPC55S69 via SDMMC).
Logs and console output
STM32U5:
STM32H7:
Environment (please complete the following information):
Additional context
I've tested a few different cards and they have the same problems.
I've tried different clocks and bus widths.
I've tried to disable the internal pullups since there are already pullups on the breakout board. I added the following to my DTS overlay:
I've looked at the signals with my oscilloscope and with the STM32U5, I see things happening on the CLK and CMD lines but nothing happening on the data lines. I haven't investigated the STM32H7 as deeply because it's not the MCU I'm interested in, just one I happened to have on hand.
I haven't tried eMMC modules (none on hand).
I'd love to test with a board that has a MicroSD slot already available but ST doesn't have any such STM32U5 boards.
The text was updated successfully, but these errors were encountered: