cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG] STM32F4 SDIO and CMSIS driver MCI interface

Eugene S.
Associate III
Posted on April 02, 2018 at 17:41

Hello ST,

I found that code, generated by STM32CubeMX for STM32F4 SDIO periperal, is poorly integrated with MCI interface (CMSIS driver). And doesn't work out of box without modification.

STM32CubeMX generates HAL_MMC_MspInit function (file stm32f4xx_hal_msp.c). 

But MCI interface expect HAL_SD_MspInit (file MCI_STM32F4xx.c, line 543).

Another problem related to SDIO_IRQ. I've disabled SDIO global interrupt here, because 

MCI_STM32F4xx.c has SDIO_IRQHandler already:

0690X0000060AIoQAM.png

(otherwise STM32CubeMX generates second SDIO_IRQHandler)

But in this case no code generated to enable SDIO_IRQn. And 

MCI_STM32F4xx.c doesn't enable this interrupt as well.

After implementing workarounds for bugs above MCI interface driver works fine.

My configuration:

8 bit eMMC

Keil MDK v5.25.1

Keil STM32F4xx_DFP v2.12.0

STM32CubeMX v4.24.0

STM32CubeF4 package v1.19.0

Best regards,

Eugene.

#stm32f4 #sdio #stm32cubemx #mci
3 REPLIES 3
Eugene S.
Associate III
Posted on April 03, 2018 at 17:45

Hello,

New

STM32F4xx_DFP

was released today. So, I've updated my configuration to

Keil STM32F4xx_DFP v2.0

STM32CubeMX v4.0

STM32CubeF4 package v1.0

But the problem still exists.

Also,FrameworkCubeMX.gpdsc doesn't have a line to include the MMC component:

 <condition id=''STCubeMX''>
 <description>Condition to include CMSIS core and Device Startup components</description>
 <require Dvendor=''STMicroelectronics:13'' Dname=''STM32F4*''/>
 <require Cclass=''CMSIS'' Cgroup=''CORE'' Csub=''''/>
 <require Cclass=''Device'' Cgroup=''Startup''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''ADC''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''CRC''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''DAC''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''DMA''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''I2C''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''I2S''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''IWDG''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''RTC''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''SD''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''SPI''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''TIM''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''UART''/>
 <require Cclass=''Device'' Cgroup=''STM32Cube HAL'' Csub=''GPIO''/>
 </condition>�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

And because of thatstm32f4xx_hal_mmc.c hasn't been included in project. I had to enable the MMC component manually to prevent compilation error:

0690X0000060AK7QAM.png

Best regards,

Eugene

Posted on April 03, 2018 at 18:19

Hello

Yauhen.Sinkevich

,

Thank you for your reported issues.This is reported internally for check and we will come back to you as soon as possible.

Sorry for the inconvenience it may bring.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on April 26, 2018 at 17:09

Hi Eugene,

Thanks for your feedback and sorry for late response.

Your request is under investigation. Meanwhile,

can you please specify :
  • the MCU used in your project.

  • Your configuration for STM32Cube Framework (API) in Keil (under ''Manage Run-Time Environment''>''Device'').

0690X0000060AnvQAE.png

Additionally, it will be more helpful if you share your CubeMX project (.ioc) 

Thanks in advance for helping to complete this thread.

Best Regards,

Mohamed