cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745 HARD_FAULT when accessing either MMC or USB disk.

HTD
Senior III

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

1 ACCEPTED SOLUTION

Accepted Solutions
HTD
Senior III

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

View solution in original post

1 REPLY 1
HTD
Senior III

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