Skip to main content
Visitor II
December 30, 2024
Question

STM32 UART Communication with DWIN LCD

  • December 30, 2024
  • 2 replies
  • 2017 views

Hello Everyone,
I’m working on a project where I’m interfacing a DWIN LCD with my STM32 microcontroller using UART. The UART TX and RX lines from the STM32 are connected to the RX and TX lines of the DWIN LCD, respectively. I’ve ensured that the baud rate, parity, stop bits, and other UART parameters are correctly configured on both devices. However, I’ve run into an issue: when both the TX and RX lines are connected, the LCD seems to receive dummy or incorrect values. Interestingly, if I disconnect the TX line and only leave the RX line connected, the LCD receives the correct data without any problems.
Any insights or suggestions on what might be causing this problem and how I can resolve it would be greatly appreciated. Thank you in advance for your help!
Let me know if you need further adjustments!

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    January 8, 2025

    Hello,

    Which STM32 ?

    Which LCD ?

    >> The UART TX and RX lines from the STM32 are connected to the RX and TX lines of the DWIN LCD

    Is GND connected ?

     

    AliHassanAuthor
    Visitor II
    January 21, 2025

    the problem was solved, the issue was in stm32 controller, as i was using stm32l432 and DWIN lcd, the stm32l432 doesn't receive and transmit data simultaneously but when i removed solder bridge on the stm32 board it worked fine.

    Super User
    January 21, 2025

    @AliHassan wrote:

    the issue was in stm32 controller


    Your description of the fix doesn't support that conclusion:

     


    @AliHassan wrote:

    the stm32l432 doesn't receive and transmit data simultaneously .


    Yes, it does - it is full-duplex.

     


    @AliHassan wrote:

    but when i removed solder bridge on the stm32 board it worked fine.


    So that's an issues with the configuration of the board - not with the STM32 controller!

    For the benefit of future readers, who may find this looking to solve a similar problem, please say

    1. what board you were using, and
    2. what solder bridge you removed.

    Then please mark that as the solution:

    https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

     

    At a guess, I suspect that you had the UART still connected to the onboard ST-Link's VCP - and that's what was interfering with your comms:

    https://community.st.com/t5/stm32-mcus-boards-and-hardware/i-cannot-receive-data-while-using-usb-to-uart-for-nucleo-f411re/m-p/690201/highlight/true#M19855

    https://community.st.com/t5/stm32-mcus-wireless/use-the-same-uart-with-stlink-and-with-another-module/m-p/645234/highlight/true#M18096

     

     

    Super User
    January 10, 2025

    Have you monitored the TX & RX lines to see what's actually happening on the wires?

    Some tips on debugging serial comms:

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/706966/highlight/true#M49