2024-02-16 03:33 AM
When I'm enabling DMA and run the code, the debugger hangs at "SCB_EnableDCache();" even though the function is correctly excuting when I go step by step. Also as seen in the examples the problem gets solved when using a static declaration "static void CPU_CACHE_Enable(void);"
Is it the issue with the debugger or the code.
Solved! Go to Solution.
2024-02-16 05:37 AM
Hello @gvenkatr13
As recommendation, I invite you to review this FAQ:
DMA is not working on STM32H7 devices - STMicroelectronics Community
2024-02-16 05:37 AM
Hello @gvenkatr13
As recommendation, I invite you to review this FAQ:
DMA is not working on STM32H7 devices - STMicroelectronics Community
2024-02-16 06:05 AM
@gvenkatr13 wrote:
When I'm enabling DMA and run the code, the debugger hangs at "SCB_EnableDCache();"
Where did you enable the cache? is that possible to share your code?
2024-02-16 07:06 AM
@gvenkatr13 Do not try to single-step thru SCB_EnableDCache and its friends. This is a known behavior. Whether it is a bug [with complex inline functions] or not IMHO does not matter, just don't do this. Converting the inline to a normal function may help, but ST won't change it because these header files come from upstream (ARM CMSIS).
2024-02-17 01:22 AM
It was automatically generate by cubeMX in main() when I enable DMA.
/* Enable the CPU Cache */
/* Enable I-Cache---------------------------------------------------------*/
SCB_EnableICache();
/* Enable D-Cache---------------------------------------------------------*/
SCB_EnableDCache();