Skip to main content
Ranjeet Singh
Senior
April 15, 2023
Question

serial port not work

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

    This topic has been closed for replies.

    10 replies

    Ranjeet Singh
    Senior
    April 15, 2023

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

    gbm
    Super User
    April 15, 2023

    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.

    My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
    Ranjeet Singh
    Senior
    April 17, 2023

    stm32l4r5zi 

    AScha.3
    Super User
    April 15, 2023

    >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 on " Best Answer ".
    Ranjeet Singh
    Senior
    April 17, 2023

    if i will use serialch340 on pins then it work

    Ranjeet Singh
    Senior
    April 17, 2023

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

    Tesla DeLorean
    Guru
    April 15, 2023

    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Ranjeet Singh
    Senior
    April 17, 2023

    external ch340 usb to serial work.why internal usb serial not work.? i have two l4r5zi

    both are new and not working

    WQ_it
    Associate III
    April 15, 2023

    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
    Super User
    April 15, 2023

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

    My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice