Skip to main content
Kyrpav
Associate III
January 24, 2024
Solved

H755 Nucleo board and F769 Discovery board error handler on loading board example

  • January 24, 2024
  • 7 replies
  • 3103 views

I have a STM32F755ZI nucleo board. I am trying to load and run simple project from the board selector. So creating new stm32 project and selecting the board. Then i try to load the project and while it seems to load the stlink led blinks 3 colours and the load in the console goes up to finish the program goes to some error handler.

 

In the debug i see the next info

 

Type "apropos word" to search for commands related to "word".

 

Type "apropos word" to search for commands related to "word".


set *(unsigned int *)0xe00430a0&=~0x1

set *(int *)0xE000EDFC=*(int *)0xE000EDFC|0x7F0

set *(unsigned int *)0x5c001004|=0x3f


Temporary breakpoint 1, main () at ../Core/Src/main.c:107
107	 timeout = 0xFFFF;

Program received signal SIGINT, Interrupt.
0x08000712 in main () at ../Core/Src/main.c:108
108	 while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));

Program received signal SIGINT, Interrupt.
0x08000720 in main () at ../Core/Src/main.c:108
108	 while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));

 

 

What is the problem what should i check. I was using STM32CubeIde 1.14.0 and i updated ot 1.14.1 and it is the same issue.

Previously i had some project that where running properly (which i started only by MCU selection and setting the rest manually) and they have now the same problem.

 

At the same time i have STM32F769DISCO board and i tried to load again the basic board example from the board selector. Program build properly and loads and then i get this problem :

Temporary breakpoint 1, main () at ../Core/Src/main.c:176
176	 HAL_Init();

Program received signal SIGINT, Interrupt.
TIM6_DAC_IRQHandler () at ../Core/Src/stm32f7xx_it.c:171
171	{

Program received signal SIGINT, Interrupt.
Error_Handler () at ../Core/Src/main.c:1874
1874	 while (1)

 

 

This topic has been closed for replies.
Best answer by mƎALLEm

So you need to remove

 timeout = 0xFFFF;
 while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
 if ( timeout < 0 )
 {
 Error_Handler();
 }

and

__HAL_RCC_HSEM_CLK_ENABLE();
/*Take HSEM */
HAL_HSEM_FastTake(HSEM_ID_0);
/*Release HSEM in order to notify the CPU2(CM4)*/
HAL_HSEM_Release(HSEM_ID_0,0);
/* wait until CPU2 wakes up from stop mode */
timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET) && (timeout-- > 0));
if ( timeout < 0 )
{
Error_Handler();
}

  And you will be in a single core configuration or "dissociated" core config.

7 replies

ST Technical Moderator
January 24, 2024

Hello @Kyrpav 

Did you check your hardware config, solder bridges? 


@Kyrpav wrote:

Previously i had some project that where running properly (which i started only by MCU selection and setting the rest manually) and they have now the same problem.


It is more likely linked to the update of CubeIDE. Would you please provide more details about your hardware and software setup to reproduce the issue ?

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Kyrpav
KyrpavAuthor
Associate III
January 24, 2024

previously means one month before. as i was just making small programs based on stm tutorials.

Nothing really serious blinking leds , pwm just getting started.

I have not resoldered anything to both of the boards. i have placed pin headers in the H755 but there is no bridge there that could connect 2 different pins i have checked with multimeter.

 

And the problem started with 1.14 also suddently. I happens on both 2 different H755 nucleo boards and 1 F769disco board.

 

I have uninstalled stmcubeIde and deleted also .stmxxx folder and the repository. and reinstalled. but non helped.

 

What else do you thing it should be tested?

 

The problem is in this line:

 

while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));

 

 

and the rcc_get_flag is problematic until the timeout variable goes -0 and then you get error handler:

 

 

int main(void)
{
 /* USER CODE BEGIN 1 */

 /* USER CODE END 1 */
/* USER CODE BEGIN Boot_Mode_Sequence_0 */
 int32_t timeout;
/* USER CODE END Boot_Mode_Sequence_0 */

/* USER CODE BEGIN Boot_Mode_Sequence_1 */
 /* Wait until CPU2 boots and enters in stop mode or timeout*/
 timeout = 0xFFFF;
 while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
 if ( timeout < 0 )
 {
 Error_Handler();
 }

 

Kyrpav_0-1706109095038.png

 

 

ST Technical Moderator
January 24, 2024

@Kyrpav I suggest you disable boot sequence to be able to debug CM7.

Here is why.

RCC_FLAG_D2CKRDY

is released by CM4. Since you are stepping in debug it could not be released at the right time.

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
January 25, 2024

So you need to remove

 timeout = 0xFFFF;
 while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
 if ( timeout < 0 )
 {
 Error_Handler();
 }

and

__HAL_RCC_HSEM_CLK_ENABLE();
/*Take HSEM */
HAL_HSEM_FastTake(HSEM_ID_0);
/*Release HSEM in order to notify the CPU2(CM4)*/
HAL_HSEM_Release(HSEM_ID_0,0);
/* wait until CPU2 wakes up from stop mode */
timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET) && (timeout-- > 0));
if ( timeout < 0 )
{
Error_Handler();
}

  And you will be in a single core configuration or "dissociated" core config.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Ruồi
Associate III
July 20, 2024

I had the same error with the H755 nucleo board with code NUH755ZIQ$AT3.
However, for the NUH755ZIQ$AT1 board, there is absolutely no problem.
What is the difference in these two boards? It's all NUCLEO and H755ZIT6 chip.NUH755ZIQ$AT1NUH755ZIQ$AT1NUH755ZIQ$AT3NUH755ZIQ$AT3