You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on enabling the SDMMC2 peripheral on the Cortex-M4 core of an STM32H747I-DISCO development board running Zephyr RTOS. My project is based on the standard rpmsg_service sample, utilizing the M7/M4 dual-core architecture.
During the SDMMC2 driver initialization, the system consistently reports clock errors. The root cause appears to be a mismatch between the actual PLL2 output frequency configured by the M7 core and the frequency expected by the M4 core's Device Tree Source (DTS) overlay.
Error Details and Diagnostic Findings
The system fails to initialize the clocks, reporting: [00:00:02.001,000] stm32_sdmmc: Failed to enable SDMMC domain clock and [00:00:02.001,000] stm32_sdmmc: failed to init clocks.
Crucially, direct measurement within the application using HAL functions shows that the actual frequency of PLL2R is 64 MHz (Output: PLL2_R = 64Mhz).
However, my M4 core's DTS overlay for the PLL2 node specifies parameters (div-m=5, mul-n=96, div-r=10, with HSE=25 MHz) which mathematically calculate to 48 MHz. This conflict between the expected 48 MHz (DTS) and the measured 64 MHz (HAL) is preventing successful initialization.
Environment
Platform: stm32h757i_eval
Sample Used: samples/subsys/ipc/rpmsg_service (as the base to build the sdmmc2/FDCAN)
Zephyr Version: 0.17.2
Key Questions for SDMMC Clock Configuration
My main objective is to ensure that the M4 core’s SDMMC driver correctly reads and uses the actual SDMMC domain clock.
Ensuring Correct Clock Frequency on M4 SDMMC Driver
To resolve the 64 MHz vs. 48 MHz mismatch, I need the exact PLL2 parameters (div-m, mul-n, div-r) that produce the measured 64 MHz.
This will allow the M4 core’s DTS to align with the clock settings configured by the M7 core.
Recommended Dual-Core Clock Configuration Methodology
What is the proper approach for peripheral and PLL configuration in a Zephyr M7/M4 dual-core setup?
Should the M7 core (Host) exclusively configure and enable all PLLs?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently working on enabling the SDMMC2 peripheral on the Cortex-M4 core of an STM32H747I-DISCO development board running Zephyr RTOS. My project is based on the standard rpmsg_service sample, utilizing the M7/M4 dual-core architecture.
During the SDMMC2 driver initialization, the system consistently reports clock errors. The root cause appears to be a mismatch between the actual PLL2 output frequency configured by the M7 core and the frequency expected by the M4 core's Device Tree Source (DTS) overlay.
Error Details and Diagnostic Findings
The system fails to initialize the clocks, reporting: [00:00:02.001,000] stm32_sdmmc: Failed to enable SDMMC domain clock and [00:00:02.001,000] stm32_sdmmc: failed to init clocks.
Crucially, direct measurement within the application using HAL functions shows that the actual frequency of PLL2R is 64 MHz (Output: PLL2_R = 64Mhz).
However, my M4 core's DTS overlay for the PLL2 node specifies parameters (div-m=5, mul-n=96, div-r=10, with HSE=25 MHz) which mathematically calculate to 48 MHz. This conflict between the expected 48 MHz (DTS) and the measured 64 MHz (HAL) is preventing successful initialization.
Environment
Platform: stm32h757i_eval
Sample Used: samples/subsys/ipc/rpmsg_service (as the base to build the sdmmc2/FDCAN)
Zephyr Version: 0.17.2
Key Questions for SDMMC Clock Configuration
My main objective is to ensure that the M4 core’s SDMMC driver correctly reads and uses the actual SDMMC domain clock.
To resolve the 64 MHz vs. 48 MHz mismatch, I need the exact PLL2 parameters (div-m, mul-n, div-r) that produce the measured 64 MHz.
This will allow the M4 core’s DTS to align with the clock settings configured by the M7 core.
What is the proper approach for peripheral and PLL configuration in a Zephyr M7/M4 dual-core setup?
Should the M7 core (Host) exclusively configure and enable all PLLs?
m7/m4 overlay detail as below:
https://github.com/WHMJJ/ZEPHYR-STM32H747-DISCO-SDMMC2-M4/tree/main/rpmsg_service_Joey_ver2_addsdmmc2
Beta Was this translation helpful? Give feedback.
All reactions