cancel
Showing results for 
Search instead for 
Did you mean: 

invalidate D-Cache in stm32h745i-disco

Maximiliano
Senior

hello everyone,

I am having a problem with my stm32H745I board testing code for the RTC,RCC and power supply it seems that it stopped working. At first it wouldn't let me upload code until with stmprogrammer I connected by holding reset.

Now I can upload code but it doesn't do anything, not even a simple led which is a test code of mine that was working.

When debugging I find that it stays in this part of the code in loop:

 

/* invalidate D-Cache */
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
do {
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
do {
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
#if defined ( __CC_ARM )
__schedule_barrier();
#endif
} while (ways-- != 0U);
} while(sets-- != 0U);
__DSB();

SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */

__DSB();
__ISB();
#endif
}"

 

I tried to update firmware, load .hex, erase memory with stmprogrammer and nothing.

 

30 REPLIES 30

Hello,



This is why users need to read the documentation before starting a development especially for complex products such as H7 dual core line:

In red is what you configured and in green is what you need to configure for this board. You can notice that the external HW is not the same. So the software needs to follow the hardware configuration:

SofLit_0-1729764833673.png

And also to refer to the Hardware getting started and board's schematics and User manual of it.

This is what is provided in the user manual of the board:

SofLit_1-1729765218246.png

And also at least to refer to the Cube examples and how they were implemented especially for ST boards.

 

 

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.