cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

usart Program

Samira Foroughi
Associate II

Hi

I programmed a stm32g030k6 micro with stm32cubProgrammer in usart mode.

But after one time program, I was never able to connect to the device in usart mode.

After that I tested with a micro stm32g030C6 also . Once again it was properly connected and programmed, but never after that.

Another question about the program with st link. Can I program this series of microbes in jtag mode?

please guide me

Thanks

8 REPLIES 8
berendi
Principal

If the internal flash is empty, the usart bootloader is started automatically. If it already contains a valid looking firmware, you have to pull the PA14/BOOT0 pin high while reset to start the bootloader.

The STM32G0 series supports only SWD, no JTAG. It requires PA13/SWDIO, PA14/SWCLK, Vss/GND, Vdd, and optionally NRST connected to ST-Link.

Thanks for your reply

I put the micro into boot mode every two times. The first time it was properly connected and programmed. Micro was in boot mode for the second time, but never connected.

I had another non-programmed micro. I tried with it. I put the micro in boot mode and it became easy to connect and program. But again I tried not to.

After that, I figured the micro controller might not be able to program more than once!

Do you have an idea?

First time, when you get a micro from the factory, it has not been programmed, its flash is empty, so the internal bootloader is started, you were able to program it through the usart port.

Second time, you have already programmed it, so your program starts instead of the bootloader.

To start the bootloader again, put a high level signal to the PA14/BOOT0 pin, i.e. connect it to the supply voltage, and reset or power up the microcontroller.

Samira Foroughi
Associate II

Thanks for your reply

Your answer seems quite logical.

I programmed the f0 and f1 micro-series over 500 times using pin boot0 and reset pin, And I'm quite familiar with this method.

But I'm having error with stm32g030 re-programming .

Because of this failure I wanted to program with stlink. But apparently there isn't enough pin to connect to the swim and jtag on this micro

You can check application note AN2606, perhaps the G0 bootloader requires a somewā€‹hat different activation pattern.

ā€‹

As you can see, both uart and swd programming depends on the PA14 pin, maybe there is something wrong with the physical connection?

Samira Foroughi
Associate II

I was able to program with swd. There was a connection problem.

But the problem with usart is still there. I read the pdf. There are differences in the F AND G Series  in boot mode.

The snapshot attachment describes the G-Series boot mode.

I'm workingā€¦

Thanks for your helpful tips

You're welcome.

I don't have a G0, so I'm afraid I can't help you further.

Samira Foroughi
Associate II

Thanks Sir:ring: