cancel
Showing results for 
Search instead for 
Did you mean: 

serial port not work

Ranjeet Singh
Senior

i am using stm32l4r5zi microcontroller .i have enabled all uart port 1,2,3,4,5 but this is not showing data on usb serial port .does l4r5 usb serial port not supporting ?


_legacyfs_online_stmicro_images_0693W00000bi9MlQAI.png 


_legacyfs_online_stmicro_images_0693W00000bi9NAQAY.png
_legacyfs_online_stmicro_images_0693W00000bi9N5QAI.png
_legacyfs_online_stmicro_images_0693W00000bi9N0QAI.png
_legacyfs_online_stmicro_images_0693W00000bi9MvQAI.png

10 REPLIES 10
Ranjeet Singh
Senior

i have also change the baud rate in LPUART1 ,(209700 to 115200 ) but data not showing

gbm
Lead III

What board? How is your UART conected to your PC? Check the schematics; you will see which pins are connected to the UART interface. Setup the UART in CubeMX, double check that the proper pins are selected for it.

AScha.3
Chief II

>i have enabled all uart port 1,2,3,4,5 

>is not showing data on usb serial port 

what now ?? use serial port on pin..xx OR usb /CDC driver as usb device ?

If you feel a post has answered your question, please click "Accept as Solution".

Explanation and context hard to follow.

Perhaps look at pin output with a scope.

Guessing a NUCLEO board.

Why using 7-bit mode?

Mismatch in bit and baud modes of terminal vs UART.

​Write a string output function that computes length.

I​f pins on GPIOG bank, make sure VCCIO2 enabled.

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

Don't use internal HSI/MSI RC clocks with that high baud-rate UART or try to slow down (to 9600 or lower). If you are using NUCLEO-L4R5ZI, the HSE oscillator is not populated. You have to use the MCO output from the ST-Link by closing SB109 and SB148 and setting HSE in bypass. That is what I experienced not a long time ago on the other L4 NUCLEO board. -wq

gbm
Lead III

Not a problem. MSI may be synchronized to LSE, which is populated on Nucleo boards.

stm32l4r5zi 

if i will use serialch340 on pins then it work

question is this why usb port not worj will othere controlller work