Problem with STM32G030F6P6
Hi all.
I am having trouble programming an STM32G030F6P6 IC.I get multiple errors. The controller is being used in standalone mode with no external components. The Errors I'm getting are mentioned:
- Target no device found
- Error halting the device
- STM32_corereset(), failure resetting target
- Failed to connect to target
...and so on.
Sometimes, the code just uploads normally to the boards, but most of the time I keep getting these errors. What I've tried so far is:
- Changed debug probe to OpenOCD and ST-LINK GDB Server
- Changed the reset behavior
- Tried to reset the controller when uploading the code
- Pulled up the reset pin
- Pulled down the reset pin
- Removed the I2C device
...and a few more things which I can't currently remember.
This design worked normally when I used a breadboard, but after I tried uploading to the PCBs the code refused to upload to the breadboard version too. I have double checked the power and data connections, and there isn't any fault with them.
Images for the schematic block diagram and the pins of the microcontroller is attached. Any and all help will be greatly appreciated.

The schematic block diagram as well as the pin diagram of the controller is attached.
Also the board consumed more power in standby mode (500uA instead of 1.8uA) when being used on the PCB. The breadboard version had no power issues. I have tried soldering on the controller and upload dummy standby code but that did not lower the power consumption either.
[Edit] by external components I meant flash and oscillators. There are 100nF and 4.7uF ceramic caps next to the power pins of the controller. The NRST pin also has a 100nF cap. The i2c pins have been pulled up by 10kΩ resistors and the internal pullups have been disabled. The IR led is connected using a 100Ω resistor to limit the current. The external supply is 3V.
