Inverted serial with Teensy LC

Status
Not open for further replies.

atok

Member
I'm trying to communicate with FrSky radio module that's transmitting with serial: 9600bps, 8bit, No parity, 1 stopping bit, INVERTED. Earlier, with Arduino Nano I used:
Code:
SoftwareSerial softSerial(14, 15, true);
softSerial.begin(9600);
but I had issues with softserial so I decided to use Teensy LC hardware serial instead:
Code:
Serial2.begin(9600, SERIAL_8N1_RXINV_TXINV);
But the data coming in does not look as it should: it repeats as expected but the values are different.

Does Teensy LC even support those SERIAL_8N1_RXINV_TXINV flags? Teensy documentation does not mention LC at all... I've found in MKL26Z64VFT4 description that there is a way to mark incoming signal as inverted (page 1217) using UART_S2 register but I have no idea how to change it from Arduino code.

Any ideas?
 
From my looking at the LC hardware manual and the Teensy code base (current), it looks like what you are doing should work. Likewise you can
also simply do the Serial2.begin(9600);
followed by Serial2.format( SERIAL_8N1_RXINV_TXINV);

Which is what the version of begin you are calling does.

When you say it is different, it would always help to see an example and what you are seeing.
 
Status
Not open for further replies.
Back
Top