2022-06-10 01:07 AM
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:
...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:
...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.
2022-06-10 01:16 AM
"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.
2022-06-10 02:12 AM
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.
2022-06-10 02:41 AM
Try to connect VDD to ST-Link and test it.
2022-06-10 04:40 AM
AFAIK stlink v3 mini only has a 5V output pin. The input range of the controller is between 2.4 to 3.6V.
2022-06-10 03:36 PM
He means T_VCC signal, which is an input on ST-LINK.
2022-06-13 03:42 AM
Tried, it also didn't work.
2022-06-13 09:17 AM
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
2022-06-21 03:29 AM
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.
2022-09-13 02:48 AM
can you please say me how you overcome from this issue