AnsweredAssumed Answered

stm32cube 4.11 v1.0 - stm32f429 - MX_SDIO_SD_Init missing code

Question asked by prothan on Nov 17, 2015
Latest reply on Nov 26, 2015 by STM32Cube-T
Hello,

I just wanted to let you know that the stm32cube 4.11 v1.0 generated code for MX_SDIO_SD_Init on the stm32f429 is missing the two last lines(if 1 bit mode selected 1 line is missing, if 4 bit mode selected 2 lines are missing) when outputting to mdk v5, so that you can fix it in future. 

void MX_SDIO_SD_Init(void)
{
  hsd.Instance = SDIO;
  hsd.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING;
  hsd.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE;
  hsd.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE;
  hsd.Init.BusWide = SDIO_BUS_WIDE_1B;
  hsd.Init.HardwareFlowControl =SDIO_HARDWARE_FLOW_CONTROL_DISABLE;
  hsd.Init.ClockDiv = 0;

//Missing from generated code if 1 bit or 4 bit selected//////////////
  HAL_SD_Init(&hsd, &SDCardInfo);
/////////////////////////////////////////////////////////

///Missing from generated code if 4 bit selected
  HAL_SD_WideBusOperation_Config(&hsd, SDIO_BUS_WIDE_4B);
//////////////////

}

Outcomes