So apparently setTxInvert does not change the idle state on STM32G4xx, (tested on G473VET6).
I would expect the idle stat to be low when setTxInvert is enabled. Is there another bit to change the idle state?
without setTxInvert

with setTxInvert

The specific port i used is PD8 and the baudrate is 8M