Skip to main content
gvenkatr13
Associate
Feb 16, 2024 11:33 AM UTC
Solved

Debugger hangs at SCB_EnableDCache();

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.

This topic has been closed for replies.
Imen.DBest answer
ST Technical Moderator
Feb 16, 2024 1:37 PM UTC

Hello @gvenkatr13 

As recommendation, I invite you to review this FAQ: 

DMA is not working on STM32H7 devices - STMicroelectronics Community

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks

8 replies

Imen.DBest answer
ST Technical Moderator
Feb 16, 2024 1:37 PM UTC

Hello @gvenkatr13 

As recommendation, I invite you to review this FAQ: 

DMA is not working on STM32H7 devices - STMicroelectronics Community

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
mƎALLEm
ST Technical Moderator
Feb 16, 2024 2:05 PM UTC

@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 "Best answer" on the reply which solved your issue or answered your question.
gvenkatr13
Associate
Feb 17, 2024 9:22 AM UTC

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

 

 

Pavel A.
Feb 16, 2024 3:06 PM UTC

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

 

ST Technical Moderator
Jul 11, 2025 3:02 PM UTC

Any idea on what's causing the delay when debugging the code? is it H/W related or S/W related?

Pavel A.
Jul 12, 2025 10:50 AM UTC

Delay? which delay? The Eclipse debugger is quite heavy so not surprising that it is slow. A machine with fast SSD drive and large RAM may help.