cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP1-CortexA7 SDMMC1 TxUnderrun Error

TSens.1
Associate II

Hi, community.

I am trying the SD UHS-I mode on your evaluation board(STM32MP157F-EV1), but it does not work.

Q1. Does HAL support UHS-I?​

Q2. Is it necessary to enable SDMMC_CLKCR_SELCLKRX_1? (when using STM32MP157F-EV1 board)

Q3. What is the reason why it works in 1Bit mode but not in 4Bit mode?

​​

Additional Information

Evaluation board: STM32MP157F-EV1

HAL library: STM32MP1xx HAL Driver(v1.5)

File system: FatFs(exFat)

Port used: SDMMC1

CPU: Cortex A7

RTOS: No (Baremetal) Not use OpenSTLinux

SDMMC1 clock source: PLL4 (100MHz)

Instance = SDMMC1

ClockEdge = Falling

ClockPowerSave = Enable

HardwaraFlowControl = Enable

BusWide = 1Bit or 4Bit

ClockDiv = 1 (50MHz)

UHS-I Speed Mode = SDR25

HAL Customization

#define USE_SD_TRANSCEIVER (1)

#define USE_SD_DIRPOL

Best regards,​

1 ACCEPTED SOLUTION

Accepted Solutions
Kevin HUBER
ST Employee

Hello @TSens.1​ ,

By looking quickly at the HAL code 1.5.0, we can see in the file "Src/stm32mp1xx_hal_sd.c"

> Src/stm32mp1xx_hal_sd.c:2338: * @arg SDMMC_BUS_WIDE_4B: 4-bit data transfer

> Src/stm32mp1xx_hal_sd.c:2359: else if(WideMode == SDMMC_BUS_WIDE_4B)

and in "Src/stm32mp1xx_ll_sdmmc.c"

> (+) Full compliance with SD memory card specifications version 4.1.

> (SDR104 SDMMC_CK speed limited to maximum allowed IO speed, SPI mode and

> UHS-II mode not supported).

Which implicitly says that USH-I mode is supported.

I was not able to find the SD memory card specifications version 4.1, but since we are fully compliant, it surely supports it.

Unfortunately, ST doesn't provide Bare metal support for MP15, so I will not be able to help you more.

There is an existing project on the community that can maybe help you (made by community member). This community project is also visible in the "Project" part of the community.st:

https://community.st.com/s/project/a8g3W000000fxc1QAA/stm32mp1-baremetal-example-projects

But I don't know if there is example using the UHS mode.

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

In order 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.

View solution in original post

1 REPLY 1
Kevin HUBER
ST Employee

Hello @TSens.1​ ,

By looking quickly at the HAL code 1.5.0, we can see in the file "Src/stm32mp1xx_hal_sd.c"

> Src/stm32mp1xx_hal_sd.c:2338: * @arg SDMMC_BUS_WIDE_4B: 4-bit data transfer

> Src/stm32mp1xx_hal_sd.c:2359: else if(WideMode == SDMMC_BUS_WIDE_4B)

and in "Src/stm32mp1xx_ll_sdmmc.c"

> (+) Full compliance with SD memory card specifications version 4.1.

> (SDR104 SDMMC_CK speed limited to maximum allowed IO speed, SPI mode and

> UHS-II mode not supported).

Which implicitly says that USH-I mode is supported.

I was not able to find the SD memory card specifications version 4.1, but since we are fully compliant, it surely supports it.

Unfortunately, ST doesn't provide Bare metal support for MP15, so I will not be able to help you more.

There is an existing project on the community that can maybe help you (made by community member). This community project is also visible in the "Project" part of the community.st:

https://community.st.com/s/project/a8g3W000000fxc1QAA/stm32mp1-baremetal-example-projects

But I don't know if there is example using the UHS mode.

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

In order 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.