-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
stm32f4 sdmmc sdio error clock is not 48MHz #78816
Comments
The clock check is a copy of what is done for USB. Both USB and SDMMC are often clocked by a dedicated 48 MHz clock. It is mandatory for USB, though it doesn't seem to be the case with SDMMC so it may be superfluous. For F412, the clock condition is this one according to the Reference Manual: In your case, PCLK2 is 100MHz, Width is 1 (default value), and SDIO_CK is 50 MHz (100 MHz SYSCLK divided by SDMMC prescaler of 2), so the calculation matches and I think you can ignore this check. As for the 48 MHz clock, the device tree misses two elements to make it work. There is a clock mux CK48MSEL that would be necessary, and also the PLLQ of PLLI2S (which means adding the Q channel in the dts bindings). |
ok, thank you. Do we keep this issue open until this is solved? |
I have added few lines of code in the PR #82259 |
Describe the bug
I'm trying to use the sdcard port of my stm32f412g-disco board.
For that, I enabled the sdmmc via a dts overlay and relevant CONFIGs and when mounting I'm getting an error:
When I add
CONFIG_SDMMC_STM32_CLOCK_CHECK=n
, everything works as expected.I tried to enable the clk_hsi48 node, but it does not exist in the stm32f4 device tree.
Is it an error I should worry? Is my workaround the correct way to fix this error?
To Reproduce
My overlay:
My prj.conf
I'm using zephyr 3.7 tag
Expected behavior
The fs_mount function should work with CONFIG_SDMMC_STM32_CLOCK_CHECK
The text was updated successfully, but these errors were encountered: