drivers: sdmmc_stm32: Fix bus width initialization sequence
Fix SDMMC initialization by starting with 1-bit bus mode and
properly configuring wide bus operation after HAL
initialization.
The SDMMC protocol requires initialization to start in
1-bit mode before switching to wider bus widths.
Previously, the driver attempted to initialize directly
with the target bus width, which could cause later read/write
failures.
Changes:
- Initialize with SDMMC_BUS_WIDE_1B instead of target bus width
- Add HAL_SD_ConfigWideBusOperation() call if needed after
successful init
- Add error logging for wide bus configuration failures
Fixes potential SDMMC read/write failures issues on STM32 platforms.
Signed-off-by: Shan Pen <bricle031@gmail.com>
1 file changed