Skip to main content
Visitor II
July 7, 2025
Question

Hard fault Handler at SCB_InvalidateDCache_by_Addr

  • July 7, 2025
  • 3 replies
  • 290 views

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
 
 

 

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    July 9, 2025

    Hello @Riya 

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

    December 16, 2025

    Hi Riya

     

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

     

    December 16, 2025

    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.