cancel
Showing results for 
Search instead for 
Did you mean: 

How can I connect NUCLEO-L031K6 with my PC by UART?

Jianxuan He
Associate II
Posted on September 14, 2017 at 10:55

I want to connect NUCLEO-L031K6 with my PC by UART. I use STM32CubeMX to generate project.

In the project, LPUART1 is always disable and cannot be configured.

I configure USART2 to asynchronous, consequently PA2 and PA15 become green.

Unfortunately, PA2 and PA15 is connected with ST-Link.

Now both of LPUART1 and USART2 are not available, so I cannot connect NUCLEO-L031K6 with my PC by UART.

Could anyone tell me how to do for connection of NUCLEO-L031K6 with my PC by UART?

Thanks!

6 REPLIES 6
Nesrine M_O
Lead II
Posted on September 14, 2017 at 12:32

Hi

hehuiwei

,

I recommend you to start from UART example under the STM32CUBEL0 firmware package :

STM32Cube_FW_L0_V1.9.0\Projects\STM32L031K6-Nucleo\Examples\UART

-Nesrine-

Posted on September 14, 2017 at 13:27

LPUART1 is always disable and cannot be configured

PA2 and PA15 are 'reserved' for USART2 VCP on your Nucleo. But you can click on them (they are orange) and put them into Reset state (gray), LPUART will become available.

Unfortunately, PA2 and PA15 is connected with ST-Link.

According to the

http://www.st.com/resource/en/user_manual/dm00231744.pdf

user manual section 6.9 you'll have to unsolder the SB2 and SB3 bridges to cut the link between PA2 and PA15 with ST-Link (if you want so).
Posted on September 14, 2017 at 12:58

Dear Nesrine,

Thanks for your reply! I would try.

In addition, I think that STM32CubeMX should support NUCLEO-L031K6 very well.

Could tell me what is wrong with me?

I think that STM32CubeMX is efficient tools, so I wish to use the tool in the future.

Thanks. 

Posted on September 14, 2017 at 13:44

Dear Jive,

Thanks for your clear instruction!

Since USART2 is connected with ST-Link, may I use hyperterminal to connect with USART2 through ST-Link?

Posted on September 14, 2017 at 13:52

If the Nucelo's ST-Link is connected to your PC using a USB cable then yes, ST-Link will act as a proxy between your PC and STM32L031's USART2. Connect the USB cable, check for a newly available COM port in your Device Manager and connect to it using Hyperterminal (or

/external-link.jspa?url=https%3A%2F%2Fwww.chiark.greenend.org.uk%2F%7Esgtatham%2Fputty%2F

, or

/external-link.jspa?url=https%3A%2F%2Fsites.google.com%2Fsite%2Fterminalbpp%2F

).

Posted on September 14, 2017 at 13:59

Dear Jive,

Thanks for your great support!