Skip to main content
Graduate II
January 24, 2025
Question

Scrolling Graph Causing Flickering with Shareable memory

  • January 24, 2025
  • 1 reply
  • 455 views

I'm using the STM32H7B3I-DK and having an issue I am not fully understanding. I am using the Scrolling Dynamic Graph and wanting to add some more peripherals such as SDMMC so I added a shareable region to the to my RAM.

However, now whenever the graph hits about 80 data values, the screen starts to flicker in some areas that are updating.

To be clear I do not have any SDMMC code in my project yet, I have only changed MPU settings to prepare for it.

Below is my relevant MPU code:

 /** Initializes and configures the Region and the memory to be protected
 */
 MPU_InitStruct.Number = MPU_REGION_NUMBER2;
 MPU_InitStruct.BaseAddress = 0x24000000;
 MPU_InitStruct.Size = MPU_REGION_SIZE_1MB;

 HAL_MPU_ConfigRegion(&MPU_InitStruct);

 /** Initializes and configures the Region and the memory to be protected
 */
 MPU_InitStruct.Number = MPU_REGION_NUMBER3;
 MPU_InitStruct.Size = MPU_REGION_SIZE_256KB;
 MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
 MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;	//commenting out this line fixes the issue but then causes SD functionality to fail
 MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE;

 HAL_MPU_ConfigRegion(&MPU_InitStruct);

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 10, 2025

    Hello @EthanMankins;

     

    Is the cache enabled?

    Could you please try to enable the cache, and use CMSIS API for cache coherency SCB_CleanDCache, SCB_CleanInvalidateDCache, SCB_CleanDCache_by_Addr, SCB_InvalidateDCache_by_Addr or SCB_CleanInvalidateDCache_by_Addr

    May be AN4839 can help you. This application note describes the level 1 cache behavior in the STM32F7 series and STM32H7 series. 

    KDJEM1_0-1739180168355.png

     

    Thank you.

    Kaouthar