How to disable data cache on stm32H743?
I'm using STM32H743 in my project.
If anyone knows how to disable D-cache, please help!
D-cache really interferes with my work - I'm tired of fighting it!
SCB_DisableDCache() - leads to nothing.
I'm using STM32H743 in my project.
If anyone knows how to disable D-cache, please help!
D-cache really interferes with my work - I'm tired of fighting it!
SCB_DisableDCache() - leads to nothing.
Hello,
First, in next time, please use </> button to paste your code. I'm updating your last post.
Second, Table 2 shows the default MPU memory region attributes for Cortex-M. So, this does not mean the cache is enabled by default but the region is cacheable. For example for the regions defined by default as device or strongly ordered and even you enable the cache using SCB_EnableXCache(), that region will not be cacheable.
Third, the difference between what I provided as MPU config is the MPU control mode: MPU privileged default:
/* Enable the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
Your code: MPU HFNMI privileged none:
/* Enables the MPU */
LL_MPU_Enable(LL_MPU_CTRL_HFNMI_PRIVDEF_NONE);
So set it to MPU privileged default.
In CubeMx:

You need also to look at the Cortex-M7 programming manual PM0253 STM32F7 Series and STM32H7 Series Cortex®-M7 processor
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.