13022591351 opened a new pull request, #19462:
URL: https://github.com/apache/nuttx/pull/19462

   ## Summary
   The STM32H7 SDMMC driver never programs the WIDBUS bits for MMC cards:
   stm32_widebus() only records the requested state and the MMC transfer
   clock preset STM32_SDMMC_CLKCR_MMCXFR is hardwired to WIDBUS_D1. When the
   mmcsd layer switches an eMMC device to 4-bit mode via CMD6 (MMC_SWITCH),
   the host stays in 1-bit mode and all subsequent data transfers fail with
   a bus width mismatch.
   
   Program the WIDBUS bits in stm32_widebus() so the host bus width follows
   the card, and add a CLOCK_MMC_TRANSFER_4BIT clock preset.
   
   ## Impact
   - arch/arm/src/stm32h7: eMMC devices now actually operate in 4-bit mode;
     SD card behavior is unchanged.
   - include/nuttx/sdio.h: CLOCK_MMC_TRANSFER_4BIT appended to enum
     sdio_clock_e (existing values are not renumbered).
   - stm32f7/stm32l4 share the same stm32_widebus() pattern and may need the
     same change; left for follow-up PRs as I can only test H7 hardware.
   
   ## Testing
   Custom STM32H743 board with eMMC (PX4 V6X derived design), same change
   verified via a backport to the PX4 NuttX 10.3 branch:
   sd_bench sequential write ~4.0 MB/s, sequential read ~6.3 MB/s.


-- 
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]

Reply via email to