cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to program STM32G474RCT3 via JTAG

Aatif Shaikh1
Associate III

Hello,

I'm working on a new project in which I'm using the new STMG series for development. At present, I'm trying to program the controller via JTAG. Unfortunately, the ST-Link is not able to connect to the controller. I'm attaching the screenshot of the error message below. Moreover, I'm also adding the schematic snippet for a better understanding. Could someone help me with some guidelines that I need to follow while designing any new custom made boards?

Part Number: STM32G474RCT3.

1 ACCEPTED SOLUTION

Accepted Solutions
Aatif Shaikh1
Associate III

Hello, Thank you all for your help.

I found the reason why my board was not able to connect it to ST-LINK. As I was not using the RTC in our project, I kept the VBAT pin in the open state. Due to this, the controller was not able to connect it to ST-LINK. So, later I followed the reference design (power section) of the NUCLEO-G474 and connected the VBAT to the VDD. 

After that, I was able to connect it to ST-LINK and able to program it somehow. Unfortunately, I was still facing some difficulties while mass-erasing and re-programming (always verification failed at random address). Additionally, the code wasn't running appropriately. After checking lots of things, I found out that there were so many issues with option bytes. The default option byte is not correctly set. So, once again, I took the reference of NUCLEO-G474 and changed the option byte accordingly.

0693W00000D14AxQAJ.png0693W00000D14AiQAJ.png

View solution in original post

3 REPLIES 3
TDK
Guru

Try STM32CubeProgrammer. The pull resistors on the SWD lines are not necessary, but I don't think they will cause problems. Ensure the power rail is stable and VCAP is stable and ~1.2V.

If you feel a post has answered your question, please click "Accept as Solution".
Mike_ST
ST Employee

Please try with the STM32CubeProgrammer software.

ST-Link-utility is officially not recommended anymore.

Aatif Shaikh1
Associate III

Hello, Thank you all for your help.

I found the reason why my board was not able to connect it to ST-LINK. As I was not using the RTC in our project, I kept the VBAT pin in the open state. Due to this, the controller was not able to connect it to ST-LINK. So, later I followed the reference design (power section) of the NUCLEO-G474 and connected the VBAT to the VDD. 

After that, I was able to connect it to ST-LINK and able to program it somehow. Unfortunately, I was still facing some difficulties while mass-erasing and re-programming (always verification failed at random address). Additionally, the code wasn't running appropriately. After checking lots of things, I found out that there were so many issues with option bytes. The default option byte is not correctly set. So, once again, I took the reference of NUCLEO-G474 and changed the option byte accordingly.

0693W00000D14AxQAJ.png0693W00000D14AiQAJ.png