Disable UART RX Teensy 3.x

Status
Not open for further replies.

capricorn one

Well-known member
Wondering if anyone has done this, I saw someone got it working on the Teensy 2.0, but obviously it will be different on the 3.x.

Need to use the transmitter for Serial2 and Serial3 on Teensy 3.1, but I also need the RX pins to be inputs. I'm guessing I can just change the register with the RXEN bit, but I don't know if it's re-enabled somewhere else outside of the begin() function.

Thanks in advance!
 
Ugh...well, doing some quick research, it looks like the RX enable bit is written every time a byte is written usingC2_TX_ACTIVE below, so I would have alter the core code in this case...

Code:
#ifdef HAS_KINETISK_UART1_FIFO
#define C2_ENABLE		UART_C2_TE | UART_C2_RE | UART_C2_RIE | UART_C2_ILIE
#else
#define C2_ENABLE		UART_C2_TE | UART_C2_RE | UART_C2_RIE
#endif
#define C2_TX_ACTIVE		C2_ENABLE | UART_C2_TIE
#define C2_TX_COMPLETING	C2_ENABLE | UART_C2_TCIE
#define C2_TX_INACTIVE		C2_ENABLE

I'm wondering if it's possible to define C2_ENABLE in my code somewhere so that it uses my definition instead of the one in the core files? Would be great if I didn't have to touch the core files..
 
Hi,

How did you get on with this?
I'm looking to do the opposite; receive on hardware serial ports 2 and 3 and use their respective TX pins as digital outputs.
 
Status
Not open for further replies.
Back
Top