2024-01-24 05:22 AM - edited 2024-01-24 05:49 AM
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)
Solved! Go to Solution.
2024-01-25 07:26 AM
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.
2024-01-24 06:08 AM
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.
2024-01-24 06:57 AM - edited 2024-01-24 07:11 AM
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();
}
2024-01-24 08:00 AM
@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.
2024-01-24 04:57 PM
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.
2024-01-25 07:20 AM
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.
2024-01-25 07:26 AM
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.
2024-07-20 06:34 AM
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.