Skip to main content
Graduate
August 23, 2022
Solved

STM32H745 HARD_FAULT when accessing either MMC or USB disk.

  • August 23, 2022
  • 1 reply
  • 778 views

I configured 2 file storage devices on my STM32H745I-DISCO board.

USB_OTG_FS and SDMMC1 (for built in eMMC).

Both devices initialize properly without errors.

The USB host detects the device, it correctly identifies it as media storage class device.

It enters the state HOST_USER_CLASS_ACTIVE.

Then I start the new RTOS task to mount the device.

On STM32H747I-DISCO it worked (although via USB_OTG_HS external).

On this board I get HARD_FAULT interrupt when the driver tries to read data.

The HARD_FAULT occurs both when trying to read or write from USB disk or MMC.

0693W00000QOIzEQAX.png0693W00000QOJ0vQAH.png

    This topic has been closed for replies.
    Best answer by HTD

    OK, the reason was not enough stack memory allocated. USB works. MMC doesn't, but no HARD_FAULT.

    1 reply

    HTDAuthorAnswer
    Graduate
    August 23, 2022

    OK, the reason was not enough stack memory allocated. USB works. MMC doesn't, but no HARD_FAULT.