SDMMC HAL doesnt appear to support 4bit data for micro SDHC?
I use CubeMX version 5.0.0 to create the SDMMC HAL for STM32L475VTGx. In CubeMX I chose 'SD 4 bits Wide bus'. The SDMMC parameters are all defaults.
While running the initialization code inside of HAL_SD_ConfigWideBusOperation() it only allows 4bit data for CardType == CARD_SECURED, not CARD_SDHC_SDXC or CARD_SDSC. I have CARD_SDHC_SDXC (a micro SDHC 4GB card).
Also if I search for CARD_SECURED, I can't find where this CardType can be assigned. Could that be due to a bad CubeMX parameter setting?
The micro SDHC card spec shows a 4bit data bus if card is in SD bus mode. It also has a 1bit SPI bus mode.
I'm not sure what bus mode is assumed upon power up. Perhaps I need to start in 1 bit mode (assuming it boots into SPI bus mode?) and then send a command to switch to SD bus mode?
I see that CardType is used frequently in the HAL message protocol, so I want to make sure I have the correct mode to actually use the HAL, if possible.
Any help appreciated.
Thanks,
-Fred
