Skip to main content
Visitor II
April 30, 2026
Question

CubeMx generates stub functions in sd_diskio.c for STM32L552ZET6Q

  • April 30, 2026
  • 1 reply
  • 157 views

Hi,

I am using the Nucleo-L552ZE-Q board.

I use STM32CubeMX version 6.17.0 which appears to be the laters version.

When generating code for SD card FAT FS using CubeMX i get "sd_disckio.c" file containing only stubs of the functions, without content (the stub functions just return error value/no_init value).

In CubeMX i have done some fault finding steps already with no luck.

I have configured SDMMC1 before enabling FATFS. I am staying with default values, exvcept clock divider (Currently using 8). I am using Mode "SD 4 wide bus"

Under Middleware->FATFS i enable it for SD card. SOMMC instance is SDMMC1, BSP code none. 

The rest is default values. FAT FS version in cubeMX is R0 12c

I have tried investigating the options in CubeMC, but i cant spot anything wrong so far. I also tried starting from scratch with a new project in CubeMX, with the same result: sd_diskio.c  only contain stubs.

Does anyone have a fix for this issue? Or can anyone point out where i find the sd_diskio.c  implementation for this MCU so i can place it manually?

 

 

1 reply

Technical Moderator
May 12, 2026
"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question.Saket_Om"