cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745 stuck waiting for M4

jgauthier
Senior

I just got started with a dual core STM32H745. I put together a quick project with CubeMX to test some FDCAN interfaces. I built the program and ran it.

I'm using Keil ARM MDK. After building, and connecting it appears to connect to the CM7 (which is fine, because that's what I wanted anyway) - but I don't get far after that.

There is some code to wait for CPU2 (CM4) for boot:

  /* 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();
  }

This never completes. I'm not really sure what to do with this.

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @Community member​ ,

Thanks for your feedback,

Please check this AN5286 on dual core debugging, it is very helpful. You can find in Section 5, MDK-ARM dual debugging.

About the BOOT_CM4 option bytes (BCM4) and CM4 boot address (BOOT_CM4_ADD0 and BOOT_CM4_ADD1), you can set them correctly using STM32CubeProgrammer.

0693W00000Npc37QAB.pngAt the moment BOOT_CM4_ADD0 and BOOT_CM4_ADD1 cannot be changed with CubeProgrammer. It is a known bug and the dev team is working on it.

So I advice you to connect your board with STLink Utility (a Legacy tool and now replaced by CubeProgrammer but still used and can be downloaded from this Link) and change the addresses.

0693W00000Npc3WQAR.png 

I hope this helps :smiling_face_with_smiling_eyes:

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

View solution in original post

5 REPLIES 5
TDK
Guru

is BOOT_CM4 enabled in option bytes? Is the CM4 code flashed and functioning correctly? Is the CM4 boot address set to where it needs to be?

If you feel a post has answered your question, please click "Accept as Solution".
jgauthier
Senior

Those are all really good questions. I'm trying to find the answers in Arm MDK, because I don't know.

Sara BEN HADJ YAHYA
ST Employee

Hello @Community member​ ,

Thanks for your feedback,

Please check this AN5286 on dual core debugging, it is very helpful. You can find in Section 5, MDK-ARM dual debugging.

About the BOOT_CM4 option bytes (BCM4) and CM4 boot address (BOOT_CM4_ADD0 and BOOT_CM4_ADD1), you can set them correctly using STM32CubeProgrammer.

0693W00000Npc37QAB.pngAt the moment BOOT_CM4_ADD0 and BOOT_CM4_ADD1 cannot be changed with CubeProgrammer. It is a known bug and the dev team is working on it.

So I advice you to connect your board with STLink Utility (a Legacy tool and now replaced by CubeProgrammer but still used and can be downloaded from this Link) and change the addresses.

0693W00000Npc3WQAR.png 

I hope this helps :smiling_face_with_smiling_eyes:

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

how you solve this issue,?can you guide me ?.i am facing same issue

Sara's response is good. There are a few things to be aware of and that post talk about it.