2021-07-27 07:31 AM
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.
Solved! Go to Solution.
2021-07-30 12:06 AM
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.
2021-07-27 07:48 AM
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.
2021-07-27 07:52 AM
Please try with the STM32CubeProgrammer software.
ST-Link-utility is officially not recommended anymore.
2021-07-30 12:06 AM
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.