cancel
Showing results for 
Search instead for 
Did you mean: 

Debugger hangs at SCB_EnableDCache();

gvenkatr13
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @gvenkatr13 

As recommendation, I invite you to review this FAQ: 

DMA is not working on STM32H7 devices - STMicroelectronics Community

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

4 REPLIES 4
Imen.D
ST Employee

Hello @gvenkatr13 

As recommendation, I invite you to review this FAQ: 

DMA is not working on STM32H7 devices - STMicroelectronics Community

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
SofLit
ST Employee

@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?

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.
Pavel A.
Evangelist III

@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).

 

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();