cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H747 Custom Board Firmware Loading Problem

ICMosquera
Associate III

Hi Madam/Sir,

We recently developed a custom board using STM32H747. The designs and schematic were based on Portenta H7 and the disco board. We received the board from PCBWay and confirmed that hardware-wise, it's okay and was proven electrically correct. However, upon loading even a simple LED toggle program on M7, the board suddenly was inaccessible, so I had to power cycle it by pulling the Boot0 to VDD. I was able to do that and erase the chip's program.

IMG_20231103_135523_217.jpg

 

However, the next time I try to load it again, it becomes corrupted again I found out that the Loading on M7 alone is ok but gets weird on M4 core. I scoured the tutorials regarding proper debugging and also tried to uncheck/check the HALT of all Cores on debugging but to no avail. I attached the screenshots of relevant info that may help me fish out where I went wrong.

Screenshot 2023-11-07 103045.pngScreenshot 2023-11-07 102855.pngScreenshot 2023-11-07 102837.pngScreenshot 2023-11-07 102807.png

Screenshot 2023-11-07 103542.png

Please help me, I desperately need this board to work. Im willing to share my schematic design on this.

 

Thanks,

Ian

 

[Updates], I debugged by step my program, M7 only, disabling the M4, and found out that the SMPS that I selected on .oic was wrong, corrected it then the program works now. However, integrating the M4 program still gives an issue "SIGTRAP" as shown on the attached image. I hope someone can help me with this. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ICMosquera ,

In fact when using SMPS you can't exceed 400Mhz in D1 domain @VOS1 and D2 is the half clock of D1 domain (200Mhz).

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

8 REPLIES 8
STOne-32
ST Employee

@SofLit   May be you have an idea ?

thank you .

SofLit
ST Employee

Hello @ICMosquera ,

First of all you need to tell us, what is the system frequency you are using? Your voltage scale is set to VOS1 so you can't exceed 400MHz.

Second, You've configured the power supply in EXTERNAL_SOURCE_SUPPLY. Are you sure?

Check your HW and see what is the power supply config your board is mounted to (refer to the Figure 22 in RM0399):

SofLit_0-1699433811252.png

According to your power config in CubeMX it's the 6th config (Bypass 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.
ICMosquera
Associate III

Hi @SofLit ,

Thank you for the reply.

1. Im using 400Mhz before, now that you mentioned it, ill try to lower it to 200MHz. Currently, my voltage scale is VOS1. This might solve my issue on M4. Ill test this later and get back if this works.

2. Yes power supply, my bad, I changed it now, my SMPS is like that of Figure 4. I found out this works now.

 

 

Hi @ICMosquera ,

In fact when using SMPS you can't exceed 400Mhz in D1 domain @VOS1 and D2 is the half clock of D1 domain (200Mhz).

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.
ICMosquera
Associate III

Hi, @SofLit ,

 

Thanks so much for the info. I managed to test my M7 working with the modified power Supply config, matching my hardware. May I ask what reference manual I can refer to when deciding what clock to use with the SMPS configuration?

 

Moving forward, my next goal is to get the M4 core to work with the correct power configuration. However, I get an error right after the HAL_Delay inside the while loop. This breaks the loop. May I ask what caused this error, see image.

Screenshot 2023-11-10 095042.png

 

Thanks,

Ian

 

 

SofLit
ST Employee

Hi @ICMosquera ,

Please refer to RM0399 (reference manual) for STM32H747 product.

Now regarding M4, I suggest you to write a very simple code on CM4 side without any low power mode or hardware semaphore.

Move your system clock config from M4 side (for example blinking a LED) and disable M7 from option bytes using CubeProgrammer (BE SURE YOU DON'T ALSO DISABLE CM4 CORE) 

SofLit_0-1699875650742.png

M4 should run.

Regarding the debug in dual core is a bit tricky but you can refer to this video.

Also see the this application note (STM32H7x5/x7 dual-core microcontroller debugging).

 

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.
ICMosquera
Associate III

@SofLit 

I did what you suggested, moved my simple toggle code to the M4 core, disabled hardware semaphore and other unnecessary lines leaving only the GPIO initialization and other stuff generated by the IDE, and then rebuilt it.

However, my problem is that when I unchecked the BCM7, and applied it on my board using the cubeprogrammer, the chip broke. Now I cannot even connect with my cubeprogrammer. I tried to pull up to boot0 to VDD, but it says it cannot reset the chip. then I pulled up the RST too, but still, I could not connect.

How sad I cannot verify this on my other board coz that too I bricked it. :( Is there any other way to revive the chip?

Thanks,

Ian

SofLit
ST Employee

@ICMosquera 

You need to connect with Access port 3 in CubeProgrammer (as shown below) as CM7 has been disabled (Access Port 0)

SofLit_0-1700030367378.png

 

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.