Skip to main content
Associate
July 9, 2024
Question

UART transmission

  • July 9, 2024
  • 3 replies
  • 2347 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.

 

 

3 replies

Andrew Neil
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

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
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.

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
476RGAuthor
Associate
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

 

TDK
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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Karl Yamashita
Lead III
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.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source