pbarada opened a new pull request, #21093:
URL: https://github.com/apache/nuttx/pull/21093
## Summary
Add CONFIG_STM32_SDMMC1/2_SD_HS_MODE which if enabled (and corresponding
STM32_SDMMC_SDXFR_HS_CLKDIV is defined in board.h) then after generic MMC/SD
driver switches to 4-bit mode and card supports high-speed, then increase SD
clk from 25Mhz to 50Mhz.
## Impact
- User experience: No adaptation required. This fix extends functionality.
- Build: No impact.
- Hardware: Affects stm32h7 based-boards that enable SDMMC
- Documentation: No impact.
- Security: No impact.
- Compatibility: Backward compatible
Note this change (by itself) does not change code execution since
STM32_SDMMC1/2_HS_MODE Kconfig option needs to be enabled, and if so then also
STM32_SDMMC_SDXFR_HS_CLKDIV needs to be set to the divisor
required to clock to 50Mhz.
## Testing
Build Host:
- OS: Ubuntu 24.04.4 LTS
- Compiler: arm-none-eabi-gcc 13.2.1
Target:
- Architecture: ARM (STM32H7S3L8)
- Build tested for all stm32h7 configurations that enable STM32_SDMMC1:
stm32f746-ws:nsh, linum-stm32h753bi:nxdoom, linum-stm32h753bi:usbmsc-sdcard,
linum-stm32h753bi:zmodem, linum-stm32h753bi:sdcard,
linum-stm32h753bi:lvglterm_kbda, linum-stm32h753bi:curl,
devebox-stm32h743:full, weact-stm32h743:sdcard,
openh743i:composite_fs, openh743i:composite_hs,
weact-stm32h750:sdcard).
Further, used this change in a not yet submitted change to add SDMMC support
to stm32h7s8-dk, and on that board used a SparkFun SD sniffer and Saleae
analyzer to verify:
- CMD6 is issued with successuful response
- SD clk increases to 50Mhz
- Successful transfers.
From console of stm32h7s8-dk:
```
Bootloader 13.1.0 846e525657-dirty Oct 27 2026 18:22:33 arm stm32h7s8-dk
NuttShell (NSH) NuttX-13.1.0
NuttShell (NSH) NuttX-13.1.0
nsh> uname -a
NuttX 13.1.0 846e525657-dirty Oct 27 2026 18:22:35 arm stm32h7s8-dk
nsh> time "dd if=/dev/mmcsd0 of=/dev/null bs=4096 count=4096"
16777216 bytes (4096 blocks) copied, 1720000 usec, 9525 KB/s
1.7200 sec
nsh> mkdir /card
nsh> mount -t vfat /dev/mmcsd0 /card
nsh> ls /card
/card:
Garmin/
nsh> ls -l /card/Garmin
/card/Garmin:
-rwxrwxrwx 9763 GarminDevice.xml
drwxrwxrwx 0 UserData/
nsh>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]