cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Connect to STM32H747 After Flashing Code in CubeIDE

KAnahar
Associate III

Hello,

I am using my custom PCB with the STM32H747IIT6 microcontroller. I have set up a JTAG/SWD connection. Initially, when I power up the board and connect via ST-Link, I can access the microcontroller through STM32CubeProgrammer without any issues.

However, after generating a new code in CubeIDE and flashing it onto the MCU, I can no longer connect to the device. I have tried selecting all available connection modes in CubeProgrammer, but none of them work.

"Error: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication."

While downloading to the code, terminal giving below messages:

"Opening and parsing file: ST-LINK_GDB_server_a16936.srec

Memory Programming ...

File : ST-LINK_GDB_server_a16936.srec

Size : 131.00 KB

Address : 0x08000000

 

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 1]

Download in Progress:

File download complete

Time elapsed during download operation: 00:00:02.893

 

Verifying ...

Download verified successfully

 

Target is not responding, retrying...

Target is not responding, retrying...

Shutting down...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying..."

 

The only way to regain access is by setting the BOOT0 pin HIGH, performing a Full Chip Erase, and then pulling BOOT0 back to LOW. After this process, I can connect again, but as soon as I flash new firmware, the same issue occurs.

I have attached images of my configuration settings and schematics.
How can I resolve this issue? I have tried both Serial Wire and JTAG modes, but the problem persists.

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

KAnahar_0-1740559904988.png

Maybe i assemblied R32 before. I removed it and assembled to the R22. It is working now. I don't now maybe main reason it is. 

View solution in original post

9 REPLIES 9
TDK
Guru

Does your firmware modify flash or go into low power states or reassign the SWD pins? Put a 1s delay before doing any of those things.

If you feel a post has answered your question, please click "Accept as Solution".
KAnahar
Associate III

I activated cortex_m7 modes. It is working but I don't know how to adjust the settings here. What should I set this settings? I have no information about this part.

KAnahar_0-1740493415586.png

 

Why do you want to adjust things? There is no "correct" setting. They are there to allow customization based on your needs. If you have no idea, leave them alone at default.

If you want to know more about a particular item, the reference manual is a good place to start. A bit out of scope to explain everything here especially as it's not the issue related to being unable to connect.

If you feel a post has answered your question, please click "Accept as Solution".
KAnahar
Associate III

Because when I activated mode settings, my main problem is solved. That's why I asked this settings.

urbito
Senior

Since the issue is happening after flashing a code into your MCU, i would suggest you to check the power configuration.

You should check the power circuit you have put in your desing/pcb/schematic and ensure that is the one you are telling to the mcu on RCC configuration.

Hope it helps.

Regards

KAnahar_0-1740559904988.png

Maybe i assemblied R32 before. I removed it and assembled to the R22. It is working now. I don't now maybe main reason it is. 

Good that it helped you to point in the right direction.

 

Give it a try and couple of test and let us know if it keeps working :)

 

Regards

Hello,

I don't see what is your power configuration SMPS or LDO according to these schematics:

VDDLDO connected to VLXSMPS? 


@KAnahar wrote:

KAnahar_0-1740559904988.png


From the reference manual, these are the HW config for the different power configs:

mALLEm_1-1740561607341.png

The configs that connect VDDLDO to VLXSMPS is through an inductor.

So need to specify which power config you are using.

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.

VLXSMPS was connecting to the VDDLDO before. I remove this configuration and directly connected to 3V3 line. It is working now. I can upload code again and again. 

HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);