Skip to content

Commit 754cdab

Browse files
committed
SDCARD: slow down clock
1 parent 84167d7 commit 754cdab

File tree

1 file changed

+1
-5
lines changed
  • libraries/Portenta_SDCARD

1 file changed

+1
-5
lines changed

libraries/Portenta_SDCARD/BSP.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,8 @@ uint8_t BSP_SD_Init(void)
100100
/* if CLKDIV = 0 then SDMMC Clock frequency = SDMMC Kernel Clock
101101
else SDMMC Clock frequency = SDMMC Kernel Clock / [2 * CLKDIV].
102102
*/
103-
#if ! defined (BSP_SD_HIGH_PERFORMANCE_CONFIG)
104-
uSdHandle.Init.ClockDiv = 4;
105-
#else
106103
/* Code for high performance */
107-
uSdHandle.Init.ClockDiv = 2;
108-
#endif /* BSP_SD_HIGH_PERFORMANCE_CONFIG */
104+
uSdHandle.Init.ClockDiv = 6;
109105
uSdHandle.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE;
110106
uSdHandle.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING;
111107
uSdHandle.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE;

0 commit comments

Comments
 (0)