Skip to main content
Visitor II
July 9, 2024
Question

UART transmission

  • July 9, 2024
  • 3 replies
  • 1035 views

Hi, I am implementing UART transmission using DMA. The output of the TX pin is hooked up to logic analyzer and shows that some data remains on the tx pins after the board being updated with new version of the code. The data shows even if I remove the code with the transmit function and so it seems as if it is being held somewhere in the hardware on the MCU. The first run of the software is okay. 

First Run:

476RG_3-1720538539999.png

 

Second Run: 

476RG_1-1720538201748.png

Third run with Transmit_.. commented out: 

476RG_2-1720538435251.png

 

thx.

 

 

    This topic has been closed for replies.

    3 replies

    Super User
    July 9, 2024

    @476RG wrote:

    some data remains on the tx pins after the board being updated with new version of the code.


    I don't understand what you mean by that?

    Please explain what your traces are showing.

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

     

    Super User
    July 10, 2024

    If data is being sent out on UART_TX after reset, it is being done by the code on the board. There is no UART peripheral memory that persists after reset.

    Look to your code and debug for the answers.

     

    476RGAuthor
    Visitor II
    July 10, 2024

    This is the output on the tx, when all the code is removed and literally programmed with no content. That's why I think that the data is retained somewhere in the HW. 

    I am using DMA in circular mode and without stopping it, the transmission cycles with the same data until the memory gets an update. 

    I attempted flushing the uarts after the transmission is finished but it does not have an effect. 

    476RG_0-1720609323325.png

     

    Super User
    July 10, 2024

    I assure you, if the chip is erased (i.e. has no content), there will be no activity on the UART line. Not too much help can be provided here without seeing any code. The issue you're running into is certainly a code bug of some sort.

    Graduate II
    July 10, 2024

    Attach your code exactly how you are describing that the HW is still sending data with code removed. Include the IOC file.