Skip to main content
bully
Senior
July 22, 2021
Question

How to properly temporarily disable UART reception ?

  • July 22, 2021
  • 2 replies
  • 3556 views

Hello,

we have UART based communication that cause crosstalk between RX and TX lines.

It can't be fixed, so I'd like to solve it in SW.

I'd like to temporarily disable/enable UART reception before/after sending on UART.

I'm already putting DMA into Pause/Resume, but I still get those crosstalk bytes (probably UART is still receiving into own buffer).

How to properly disable UART reception for some short time ?

I could do deinit_/init procedure, but maybe there is a shorter way...

thanks in advance.

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
July 22, 2021

0693W00000D0KcCQAV.pngJW

bully
bullyAuthor
Senior
July 22, 2021

Hello,

thanks for the tip. I'll check and implement it...

Regards.

Guenael Cadier
ST Employee
August 2, 2021

0693W00000D1HJ9QAN.jpgIn case you want to restart reception with a clean (empty) Rx content (and discard a data that might have been received prior you disable/enable RE), you could also flush the RX path by writing 1 in RXFRQ bit in USART_RQR register.

Regards

Helger Brenner
Visitor II
July 22, 2021

Just some wild suggestion:

Since you are prepared to compromise some transmission speed. So, why not adding some redundancy instead? Send every byte three times and apply "majority". Hardware error correction (parity check?) will have to be disable, I think.

Regards

bully
bullyAuthor
Senior
July 22, 2021

It is a wild idea, but I think that sending more chars will just cause more crosstalk and echos... I think the easiest solution is not receive, while transmitting...

Regards.