2020-07-15 11:48 PM
Hi,
I am working on STMCubeIDE 1.3.0 with STM32722VE LQFP-100 Package .
SD 1-Bit mode is working Fine for me .
When I am trying to set SD 4-bit the code always generate SD 1-Bit mode .
Is there any Bug ?
hsd2.Init.BusWide = SDMMC_BUS_WIDE_1B;
Also , By changing to SDMMC_BUS_WIDE_4B with DMA SDMMC_TX, SDMMC_RX and
SDMMC Interrupt .
SDMMC Card is not working .
--
Karan
2020-07-16 05:15 AM
It is initialized in stages. First it's initialized as 1bit, then it switches to 4bit.
2020-07-16 07:13 AM
Agreed, usually it is brought up in one mode and then switched if successful.
ST has been a bit inconsistent about how they do this across lines and HAL releases, some have similar code in HAL_SD_Init() whilst other pop it out a level in the BSP side initialization code.
If 1-bit mode doesn't work 4-bit surely won't. And 4-bit mode is a lot less tolerant of wiring, loading/drive and skewing issues. Real easy to get it to not work.
2020-07-16 08:24 AM
Hi,
Thanks... Both of you...
1-bit is working as my end . I am using SDMMC2 .
But HAL_SD_ConfigWideBusOperation() is not generated at my setup as per below setting..
Any thing I am missing..
--
Karan
2020-07-16 11:48 AM
> Any thing I am missing..
I don't see anything wrong in your setup.
I generated a project and initialized SD as 4-bit and pasted the screenshot of what it generated. I don't see why it would behave any differently for you.
You can always edit the CubeMX generated code.
2020-07-16 11:54 AM
Ok..
Are you using STM32CubeIDE 1.3.0.
Please share your generated .c file from your setup.
--
Karan
2020-07-16 10:46 PM
Hi,
Thanks
I have succeeded to work with
SD 4-Bit Mode by manually adding in CubeMX generated Code. Able to Create txt file.
How to be sure that 4-bit Mode Configure and Worked properly..?
--
Karan
2020-07-17 06:16 AM
> How to be sure that 4-bit Mode Configure and Worked properly..?
I would examine the traces on a scope, or time a particularly long transaction and ensure it completes faster than would be possible in 1-bit mode.