cancel
Showing results for 
Search instead for 
Did you mean: 

I am new to STMicro products. How do I connect an STM32l010F4 to an ST-link programmer? Is there a document that explicitly states which STM32l010F4 pin connects to which ST-link pin?

LGoye.1
Associate II

I do not have room on my board for a large connector, so I need to create a custom cable. The STM32l010F4 boots via USART, yet I cannot find anything in the ST-link docs that says "connect this pin to usart Tx, and this one to the usart rx, etc.

If someone could point me to a dcoument, I would appreciate it.

14 REPLIES 14

Cortex-M0(+) parts generally a header perhaps exports SWDIO, SWCLK, NRST and GND.

The pods with buffering chips would also want to see VTarget (VCC) to match the levels used in your system.

The 10-pin SWD connectors aren't massive, there's also Tag-Connect type foot prints, or you could put debug/tag connectors on break off stalks or edge castellations, etc.

The ST-LINK/V2 doesn't have a USART

The ST-LINK/V3 does, and has a diagram in the manual

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

For UART programming, check App Note AN2606

Typically want to export RX, TX, NRST, BOOT(0), GND

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LGoye.1
Associate II

Hi Tesla,

I looked at the various st-link V3 data sheets, and I still don't see a table that explicitly states "usart Tx ties to this pin".

It may be a terminology problem. These devices only program via the USART.

Which manual were you referring to that has a wiring diagram?

Thanks for your help.

Hi Tesla,

Ok, I messed up and entered this as an answer rather than hit reply. Sorry about that.

I looked at the various st-link V3 data sheets, and I still don't see a table that explicitly states "usart Tx ties to this pin".

It may be a terminology problem. These devices only program via the USART.

Which manual were you referring to that has a wiring diagram?

Thanks for your help.

S.Ma
Principal

If the goal is to program the flash non volatile memory of the microcontroller, you can use the ARM SWD debug link which requires RESET/SWDCLK/SWDIO and optionally control manually the BOOT pin.

The USART RS232 interface is only if you want to program the chip with the BOOT pin and the USART interface, without SWD. That is more for programming lots of boards, while SWD is for debug, program, run, breakpoint, etc...

If you look at the STLinkV3minie the signals are well described through for example the STM32C0316-DK schematics. The main extra feature of the minie is that it adapts to different target MCU operating voltage (1.8 to 3.6V) through a level shifter chip.

FBL
ST Employee

Hello @LGoye.1​ 

As mentioned by Tesla, you can find in AN2606 STM32 microcontroller system memory boot mode - Application note the hardware resources used by this bootloader.

In section, 54 STM32L01xxx/02xxx devices bootloader, you can find the USART's programming setup.

0693W00000aJkjKQAS.pngHope this helps!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks your your help. I was wondering how to program the processor using the usart, i.e., how to program through the usart rather than through SWD.

I still feel this is poorly documented.

I found a post elsewhere that claimed the cube software will recognize a FTDI USB to serial device. I have not verified this yet, but if it works that answers my question.

Leo

>>I still feel this is poorly documented.

The USART methods have been documented for the best part of 15 years, I don't think that's the problem here.

https://www.st.com/resource/en/application_note/an3155-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

The STM32 Cube Programmer has COM/UART communication options. There are older applications, and also open-source examples, and the protocol isn't exactly hard to implement from scratch.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..