2026-03-31 11:50 AM
If I don't enable RX line inversion, everything works fine. But when I enable inversion, I constantly get frame errors. The DMA operates in cyclic mode, without interruption. It's just like a ring buffer. In normal mode, everything works without problems. The signal source itself was tested on another device with a purely hardware signal inverter, and everything was fine. It's unclear why enabling inversion causes the problem. Perhaps someone can give me a hint as to what might be causing this? Thank you.
Solved! Go to Solution.
2026-04-09 4:41 AM
The problem is basically solved.
Packets are received without problems. But there is one thing that is not clear. In direct mode, the UART is set to 8N2 and everything works, but in inverse mode it started working at 8E1. It seems that the hardware invert introduced some distortions.
2026-03-31 1:35 PM
If it works in non inverted mode then the signal is not inverted. Getting frame errors would be expected.
2026-04-01 3:29 AM
Let me clarify the problem.
I have an STM32H743 processor, and I configure UART8 to receive in direct mode, without inversion, plus DMA.
A device whose serial port operates in inverse mode is connected to the RX line, but not directly, via a hardware inverter. Everything works fine.
Then, I connect this same device directly and set the RX line to inverse mode in the processor settings (STM32H743). However, the processor constantly returns a frame error instead of data.
Please help. Has anyone used the serial port in line inversion mode and knows the nuances of this operation?
2026-04-02 11:01 AM
> I have an STM32H743 processor, and I configure UART8 to receive in direct mode, without inversion, plus DMA.
A device whose serial port operates in inverse mode is connected to the RX line, but not directly, via a hardware inverter. Everything works fine.
Again, if it receives correctly in normal mode, all indications suggest the incoming data is not inverted.
2026-04-02 6:42 PM - edited 2026-04-02 6:43 PM
What does "inversion" mean - swapping RX and TX pins or high/low active signal?
Try to test without DMA (in polled or interrupt mode). Will the problem still reproduce?
> A device whose serial port operates in inverse mode is connected to the RX line, but not directly, via a hardware inverter. Everything works fine.
Is the RX pin on the STM32 side pulled up or down? Check the signal voltage relative to the STM32 ground in both cases.
2026-04-02 8:42 PM
> set the RX line to inverse mode in the processor settings
This is ambiguous, there is no "inverse mode" setting.
There is "RX Pin Active Level Inversion" and "Data Inversion". Both need selected if the channel has been inverted.
2026-04-09 4:41 AM
The problem is basically solved.
Packets are received without problems. But there is one thing that is not clear. In direct mode, the UART is set to 8N2 and everything works, but in inverse mode it started working at 8E1. It seems that the hardware invert introduced some distortions.