cancel
Showing results for 
Search instead for 
Did you mean: 

UART2 can't receive data from PC in STM32L476RG nucleo

paker earth
Associate II
Posted on January 24, 2017 at 11:54

Hi all

I'd like to use UART2 to receive data, but It seemed to be failed, only could transmitted data.

I used the same codes in UART1, everything is fine,

So I think HW and SW parts are fine except UART2.

I had not connect SB62 & SB63  to enable PA3 & PA2, and used the CN3 of the st-link part for my project.

May I miss something? Or I should connect 

SB62 & SB63 to use PA3 & PA2 pins?

If anyone could tell me how to fix it?

Thank you in advance.

0690X00000605zpQAA.png
3 REPLIES 3
Oliver Beirne
Senior
Posted on January 24, 2017 at 12:49

Hello

I have moved your question to the

https://community.st.com/community/stm32-community/stm32-forum?sr=search&searchId=a1ec48e7-727c-420e-8507-95ce3c6520d3&searchIndex=0

‌ where someone should be able to assist you.

Thanks

Oli

Jack Peacock
Associate II
Posted on January 24, 2017 at 14:40

Some nucleo boards connect USART2 to the STLINK JTAG programmer on the board.  It's used as a serial port through the STLINK USB.  Check your schematic; to use it you may need to remove some jumpers.  For USB it's fixed at 9600, 8 bit, no parity, 1 stop, and should appear as a COM port on a host PC.

  Jack Peacock

Guenael Cadier
ST Employee
Posted on January 25, 2017 at 09:50

Hi,

Maybe some information available in UM1724 (see

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

 ).

Please refer to chapter 6.9, especially this area :

0690X000006062rQAA.png

SB62/SB63 OFF removes connection between PA2/PA3 and D0/D1 on CN9 (or CN10).

Could you confirm your setup is as follows ?

- SB62-SB63 OFF, SB13-SB14 ON so that PA2/PA3 of L476 are connected to STLINK, 

- PC connected to USART2 using Virtual com port, through ST Link

If so, i would also expect it to work.

regards

Guenael