cancel
Showing results for 
Search instead for 
Did you mean: 

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

Kyrpav
Associate III

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)

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

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 on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

7 REPLIES 7
FBL
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
Kyrpav
Associate III

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

 

 

@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 Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
Kyrpav
Associate III

can you explain how to disable boot sequence? i have ideentified that if i try not to build and load CM4  i get the issue. So if i have a CM4 from previous project. also if i load CM4 and not CM7 again the board is dead.

 

Hello @Kyrpav ,

STM32H755 is a dual core product and the way CubeMx is generating the code implies you need to run M4 and M7 because in the generated code there is a sort of synchronization at the beginning of the application to let CM7 configures the RCC and then releases CM4. So CM7 needs an acknowledgement from CM4 to continue its code execution. If CM4 doesn't send this "acknowledgement " CM7 still stuck.

If you need to use only CM7, you need to remove the code related to this synchronization.

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.
SofLit
ST Employee

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 on "Accept as Solution" on the reply which solved your issue or answered your question.

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