Skip to main content
JKiel.1
Visitor II
April 4, 2022
Question

Is there any documentation on the SDMMC_STA_STBITERR bit?

  • April 4, 2022
  • 2 replies
  • 1287 views

We are using an eMMC Card with the STM32l476VE MCU.

I don't think it is relevant, but the eMMC is the Micron MTFC8GAKAJCN-4M IT TR.

We are having intermittent failures in HAL_MMC_ReadBlocks() in which SDMMC_CmdReadSingleBlock() returns SDMMC_ERROR_CMD_RSP_TIMEOUT(4).

If we check the SDMMC_STA register (hmmc->Instance->STA) before the call to SDMMC_CmdReadSingleBlock(), the SDMMC_STA_STBITERR bit (bit 9) is set.

According to the Reference Manual (RM0351 rev 9.0 2021-06-29), bit 9 of the SDMMC status register is reserved.

This bit is not mentioned in the datasheet for the STM32l476VE.

The only documentation is the comment in the Header file "/*!<Start bit not detected on all data signals in wide bus mode */".

The code was generated with STM32CubeMX V6.4.0 using STM32Cube FW_L4 V1.17.1

At no place in the code is the SDMMC_STA_STBITERR bit checked.

Is there any documentation on the SDMMC_STA_STBITERR bit?

When does this bit in SDMMC_STA get updated?

Is there any way in software to recover from this error?

If this *MUST* be fixed in hardware, what should we be looking for?

Does it make sense that this condition is causing SDMMC_CmdReadSingleBlock() to return SDMMC_ERROR_CMD_RSP_TIMEOUT?

We just found out that a similar error is happening very intermittently with SDMMC_CmdWriteSingleBlock() returning SDMMC_ERROR_CMD_RSP_TIMEOUT(4).

This topic has been closed for replies.

2 replies

Amel NASRI
ST Technical Moderator
April 7, 2022

Hi @JKiel.1​ ,

I confirm that the bit 9 in SDMMC_STA is reserved as described in the reference manual so SDMMC_STA_STBITERR needs to be removed from stm32l476xx.h.

Internal ticket number: 125969 (This is an internal tracking number and is not accessible or usable by customers).

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
gfuehrer
Associate III
August 24, 2023

I recently experienced this bit being set, and I came here to learn about it, but this is all I could find searching for SDMMC_STA_STBITERR.

It would be nice if someone knowledgeable about the SDMMC peripheral in the L4xx series would answer the OP's questions, since I have the same ones. Is that possible?

It was never a question whether or not it is considered reserved. And we know that it does something in this peripheral, possibly even matching it's name Start Bit Error. The headers in STM32Cube_FW_L4_V1.18.0 have already changed the #define for SDMMC_STA_STBITERR to be in a separate section commented as "Legacy", but not the matching SDMMC_ICR_STBITERRC.

My feeling is that this bit on the L4xx should be documented and, if there's a problem with it, discuss that in the errata.

Thanks for listening,

-Gary