Skip to content

DBCKEND flag not set on STM32H753, causing init_sd_card to hang #4723

@KOBA789

Description

@KOBA789

I'm encountering an issue when using SDMMC on STM32H753 with Embassy.

  • When calling init_sd_card, the function hangs.
  • After investigation, I found that it gets stuck in complete_datapath_transfer, waiting for the DBCKEND flag.
  • However, checking the registers showed that the DBCKEND flag is never set.

According to the STM32H753 reference manual, the DBCKEND flag should be set in this situation, but in my experiments it never happens.

I have a hypothesis (not fully confident): when using IDMA, the DBCKEND flag might not be set at all. This could potentially be an erratum.

As a workaround, I tried calling complete_datapath_transfer(false), and then everything worked correctly.

I also found this related commit: c8a4a49

From this commit, I can see that the code was intentionally changed to wait for DBCKEND instead of DATAEND. It seems to reflect a deliberate design choice, but I couldn’t find any documentation or reasoning behind this change.

Could you explain the rationale for preferring DBCKEND over DATAEND here?
Also, has anyone observed similar behavior with IDMA and DBCKEND on STM32H7?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions