Possible CubeMX Bug on Nucleo-L467RG : SD Card.
Hey guys,
I'm pretty new to Stm32 controllers, but I might find a bug. Just want to report it, in case I am right.
Im using Stm32 Workbench Eclipse, Stm32CubeMX and a Nucleo-L476RG.
I tried to get a sd card working on my board. So I had a SD-Card onboard with a 4-bit bus on my Nucleo with following configs:
PC8 ------> SDMMC1_D0
PC9 ------> SDMMC1_D1
PC10 ------> SDMMC1_D2
PC11 ------> SDMMC1_D3
PC12 ------> SDMMC1_CK
PD2 ------> SDMMC1_CMD
The moment I set the settings in CubeMX I get this standard code as my SDMMC settings:
hsd1.Instance = SDMMC1;
hsd1.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING;
hsd1.Init.ClockBypass = SDMMC_CLOCK_BYPASS_DISABLE;
hsd1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE;
hsd1.Init.BusWide = SDMMC_BUS_WIDE_1B;
hsd1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE;
hsd1.Init.ClockDiv = 0;
First of all the (HAL_SD_Init(&hsd1) is missing.
Secondly the hsd1.Init.BusWide = SDMMC_BUS_WIDE_1B; is not set to 4B.
When I change it to 4B my whole IDE is not working in debug mode.
Is it me getting something wrong or why can't I use my sd card on a 4Bit bus?
Greetings,
Trung