cancel
Showing results for 
Search instead for 
Did you mean: 

UART transmission

476RG
Associate

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.

 

 

5 REPLIES 5
Andrew Neil
Evangelist III

@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

 

TDK
Guru

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

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

 

Karl Yamashita
Lead III

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

If smoke escapes your device, put the smoke back in. It'll still work as a conversation piece. If you find my answers useful, click the Accept as Solution button so that way others can see the solution.

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