Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Disable UART RX Teensy 3.x

Hybrid View

  1. #1
    Member capricorn one's Avatar
    Join Date
    Oct 2014
    Location
    Los Angeles
    Posts
    53

    Disable UART RX Teensy 3.x

    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!

  2. #2
    Member capricorn one's Avatar
    Join Date
    Oct 2014
    Location
    Los Angeles
    Posts
    53
    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..

  3. #3
    Senior Member
    Join Date
    Dec 2014
    Posts
    310
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •