2025-01-24 11:11 AM
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);
2025-02-10 01:41 AM
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.
Thank you.
Kaouthar
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.