cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with STM32G030F6P6

SRauf
Associate II

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.

0693W00000NrbdNQAR.jpg0693W00000Nrbd8QAB.pngThe 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.

9 REPLIES 9
Danish1
Lead II

"with no external components"?

As I understand things, you must have power-supply-decoupling ceramic capacitor(s) electrically close to the stm32 microcontroller (within a few mm). Without this, you should not expect sensible behaviour.

Oh right forgot to mention, There are 100nF and a 4.7uF capacitor placed at about 1mm from the power pins of the controller. The NRST pin also has a 100nF cap. Other than that, the IR LED has a 100Ω resistor and the I2C is pulled up using 10k resistors. The internal I2C pullups have been disabled.

Slh
Senior

Try to connect VDD to ST-Link and test it.

SRauf
Associate II

AFAIK stlink v3 mini only has a 5V output pin. The input range of the controller is between 2.4 to 3.6V.

He means T_VCC signal, which is an input on ST-LINK.

Tried, it also didn't work.

Mecanix
Senior

I can replicate this random error programming behavior when I connect the programmer using long and unshielded leads. Try using <5cm with low resistance leads for the SWs and GND and see if it improves

Sorry for the late reply, I was on another project and could not test it earlier.

I tried that today and shortened the wires, but it didn't work either. The code is being uploaded to one board so I can say that the wire length isn't an issue, but now I'm getting "failed to halt target" and "STM32_CoreReset(), failure reset target" errors.

can you please say me how you overcome from this issue