cancel
Showing results for 
Search instead for 
Did you mean: 

Hard fault Handler at SCB_InvalidateDCache_by_Addr

Riya
Associate II

I’m working on a project using STM32H7 (Cortex-M7 core) with eMMC and Azure RTOS FileX to manage file systems.
The buffer is allocated as:
ALIGN_32BYTES (uint32_t fx_mmc_media_memory[FX_STM32_MMC_DEFAULT_SECTOR_SIZE / sizeof(uint32_t)]);

During initialization, I call:
fx_system_initialize();
fx_media_open(&gst_mmc_disk, "eMMC", fx_stm32_mmc_driver, ...);

However, the system crashes with a HardFault inside: SCB_InvalidateDCache_by_Addr()

which is called from: fx_media_open() ->fx_stm32_mmc_driver() ->mmc_read_data() ->invalidate_cache_by_addr() 

CopyEdit
 
 

 

3 REPLIES 3
Saket_Om
ST Employee

Hello @Riya 

Please make sur fx_mmc_media_memory is placed in a cacheable region and cache is enabled. 

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.
Saket_Om
hlyder
Associate

Hi Riya

 

Looks like I ran into the same problem you reported, did you discover a fix?

 

hlyder
Associate

I experienced the same problem, and for me the solution is to enable the DCache. Enter the Stm32CubeMX (6.15.0) - Under system core, item CORTEX_M7, "Cortex Interface Settings, CPU DCache set to Enabled.