Skip to main content
gvenkatr13
Associate
February 16, 2024
Solved

Debugger hangs at SCB_EnableDCache();

  • February 16, 2024
  • 3 replies
  • 2799 views

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.

Best answer by Imen.D

Hello @gvenkatr13 

As recommendation, I invite you to review this FAQ: 

DMA is not working on STM32H7 devices - STMicroelectronics Community

3 replies

Imen.DBest answer
ST Technical Moderator
February 16, 2024

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
February 16, 2024

@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
February 17, 2024

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.
February 16, 2024

@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 Employee
July 11, 2025

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

Pavel A.
July 12, 2025

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.