2022-05-16 10:15 PM
Hi all.
I am having some trouble with communicating with an STM32G030F6 IC. I am using STM32CubeIDE to code and STlink-v3 mini to upload the code. The SWCLK and SWDIO pins are being used to upload the code. 3.3V is being supplied from elsewhere and the voltage reference for all the peripherals connected (STlink, STM32 IC, Power supply) are common. At first I was not able to upload the code at all, and was getting the "Target device held at reset" error which was resolved by pulling up the NRST pin. At this point the code is uploading, and the IDE goes into debug mode but I cannot get the code to function. The code is a simple blink code which toggles Pin 5 of Port A every second. This is being done using HAL_GPIO_TogglePin() and HAL_DELAY() functions. Any insight to what the problem could be?
Any and all help will be greatly appreciated.
Solved! Go to Solution.
2022-05-17 10:31 PM
Hello there,
It's difficult to say without additional information.
If the code is being flashed successfully with CubeProgrammer and the debug session runs without issue but the code is not doing what you wish it to do then I see two potential problems:
2022-05-17 12:48 AM
There is something wrong with the schematic or assembly and since you didn't show it there is no way to point out the problem. Normally NRST may be left unconnected.
2022-05-17 10:31 PM
Hello there,
It's difficult to say without additional information.
If the code is being flashed successfully with CubeProgrammer and the debug session runs without issue but the code is not doing what you wish it to do then I see two potential problems: