cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 4.26.0 generate code from .IOC file results in default HAL drivers, instead of my custom settings

dziku
Associate II

Attached is a CubeMX 4.26.0 project file (.IOC) with custom settings for the SDMMC1 interface (SDMMC1 hardware control ENABLED, among many other things). Yet when I generate code, for an Atollic project (or any kind of other project), and look at the HAL_SD_Init_Card() function in "Drivers\STM32F7xx_HAL_Driver\Src\stm32f7xx_hal_sd.c" I see SDMMC_HARDWARE_FLOW_CONTROL_DISABLE... As a matter of fact, none of my custom interface configurations are in any of the HAL files... It looks like all the files are unmodified, just copied from the CubeMX repository (modified data is over 2 weeks ago for every file)...

0693W000006FDeyQAG.jpg 

Please help, I'm ripping my hair out over this...

5 REPLIES 5
TDK
Guru

Most HAL driver files (such as stm32f7xx_hal_sd.c) don't change based on your configuration. Initialization functions in main() and in stm32f7xx_hal_msp.c will change.

SD cards are all brought up in the same configuration. Not sure what this particular bit does, but my guess is HAL doesn't support it, or doesn't support it well.

If you feel a post has answered your question, please click "Accept as Solution".
dziku
Associate II

Thank you, I was looking in the wrong spot.. 🙂 trying to get this SDMMC1 interface to work with a Board and SD Card that works when I use the "STM32Cube_FW_F7_V1.15.0\Projects\STM32746G-Discovery\Applications\FatFs\FatFs_uSD" example, but no luck so far...

dziku
Associate II

But, I still don't understand why my SD Card interface is not working (looks like the clock is not functioning correctly):

signal 1 is SDMMC1 clock

signal 2 is SDMMC1 CMD

signal 3 is SDMMC1 data bit 1

here is a bus capture of this project not working:

0693W000006FE3XQAW.jpg 

here is a bus capture of working interface:

0693W000006FE3SQAW.jpg 

any help will be greatly appreciated!!l

TDK
Guru

In your original post, you said you were generating your own code with an IOC file. In your later post, you said you were trying to get the "FatFs_uSD" example working. I would stick with one or the other. I think the "FatFs_uSD" example from has a better chance of working than whatever CubeMX is spitting out.

If you feel a post has answered your question, please click "Accept as Solution".
dziku
Associate II
Well than, can anyone generate a simple example using CubeMX 4.26.0 that writes to an SD Card using SDMMC1 ? Seems simple enough, right? I can't do it (but I have the added complication of STemWin in between)