cancel
Showing results for 
Search instead for 
Did you mean: 

PC connection to STM32L432 for data communication

Raphael716
Associate II

Hello everyone,


I have a Python app that needs to communicate with my custom STM32L432KC board. Before ordering my prototype board, I was wondering if it is possible to do it only via USB with the pins PA11 and PA12, or if I need a USB‑UART chip like the CP2101‑GM?

 

Thanks

4 REPLIES 4
mƎALLEm
ST Employee

Hello,

And what is the relation of ST-LINK in the thread's title with your question?

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.
Raphael716
Associate II

Actually, I'm wondering if I need an ST-Link or if the CP2101-GM chip will be able to communicate via UART without it. So, do I need an ST-Link to see the STM32 in the COM port on Windows, or will the CP2101-GM chip work as well? And is the chip necessary, or can I have a COM port with just the STM32 chip?

Ok but the tilte needs te be updated to more concise.

Which ST-link you are referring to? a stand alone ST-LINK like this one:?

mALLEm_2-1771189781418.png

 

Or an ST-LINK that you've de-attached from a Nucleo board?

mALLEm_1-1771189605344.png

For the second one yes you can do it. For the first one, not possible.

Meanwhule, you can use any USB to UART bridge to connect your PC/USB to STM32/U(S)ART.

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.
Andrew Neil
Super User

@Raphael716 wrote:

was wondering if it is possible to do it only via USB with the pins PA11 and PA12


Yes, the STM32L432KC has USB on pins PA11 and PA12:

AndrewNeil_0-1771235605489.png

https://www.st.com/resource/en/datasheet/stm32l432kc.pdf#page=53

via: https://www.st.com/en/microcontrollers-microprocessors/stm32l432kc.html#documentation

 

That will mean that you will have to do a complete USB hardware design on your custom board, and provide a complete USB software implementation in your custom software.

 

Depending on your level of both hardware & software experience, you may find it easier to just use a USB-to-UART  adaptor...

(avoiding the complexities of USB hardware & software implementation is exactly why USB-to-UART adaptors exist)

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.