File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
ports/stm/common-hal/sdioio Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,10 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self,
145145 self -> handle .Init .ClockEdge = SDMMC_CLOCK_EDGE_RISING ;
146146 self -> handle .Init .ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE ;
147147 self -> handle .Init .BusWide = SDMMC_BUS_WIDE_1B ;
148- self -> handle .Init .HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE ;
148+ // For the SDMMC controller Hardware Flow Control needs to be enabled
149+ // at the default speed of 25MHz, in order to avoid FIFO underrun (TX mode)
150+ // and overrun (RX mode) errors.
151+ self -> handle .Init .HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_ENABLE ;
149152 self -> handle .Instance = SDMMCx ;
150153 #else
151154 __HAL_RCC_SDIO_CLK_ENABLE ();
You can’t perform that action at this time.
0 commit comments