Teensy 3.5 RX4-TX4 RX5-TX5 RX6-TX6 pins inverted

Status
Not open for further replies.

ppoirier

Member
Just received my Tennsy 3.5 and I connected my 5 serial sensors on Uart2 to Uart6.
Started the basic Serial to Serial test, as in the example, and I could not read data on Uart 4 - 5 - 6....
After some probing, I realized that RX4-TX4 RX5-TX5 RX6-TX6 pins are inverted on the picture card :confused:

Can anyone confirm ?

Best regards
 
Last edited:
Not sure I've physically connected since Beta but ... Seems to match my card in the software it shows this - for the ones that are adjustable, others are hardcoded as needed:

Code:
T:\arduino_1.8.5\hardware\teensy\avr\cores\teensy3\serial4.c
static uint8_t rx_pin_num = 31;
static uint8_t tx_pin_num = 32;

Code:
T:\arduino_1.8.5\hardware\teensy\avr\cores\teensy3\serial5.c
static uint8_t tx_pin_num = 33;

Code:
T:\arduino_1.8.5\hardware\teensy\avr\cores\teensy3\serial6.c
static uint8_t tx_pin_num = 48;
 
Yes, I looked at that as well, I am missing the Eagle files to follow the traces, its either something overlooked... or I am getting crazy !!! Both options are plausible :p
 
If the wires can be adjusted - loop Serial1 RX/TX to those three in turn crossing RX and TX based on the card and write out Serial1 while the Serial[4,5,6] port under test writes out what it reads in. That should then come back to read on Serial1 to print to USB.

Perhaps the crossing is getting mixed up where "sender A" TX must connect to "receiver B" RX and then the inverse to return data from "receiver B" TX goes to "sender A" RX?
 
I did a simple ''read only '' test , and RX4-TX4 is still crossmapped
#define HWSERIAL1 Serial1
#define HWSERIAL3 Serial3
#define HWSERIAL4 Serial4

void setup() {
HWSERIAL1.begin(115200);
HWSERIAL3.begin(115200);
HWSERIAL4.begin(115200);
}

void loop() {
int incomingByte;

if (HWSERIAL3.available() > 0) {
incomingByte = HWSERIAL3.read();
HWSERIAL1.print("UART3 received: ");
HWSERIAL1.println(incomingByte, DEC);
}

if (HWSERIAL4.available() > 0) {
incomingByte = HWSERIAL4.read();
HWSERIAL1.print("UART4 received: ");
HWSERIAL1.println(incomingByte, DEC);
}
}
 
Re-did the example to wire Serial1<>3 and Serial2<>4 and worked as labeled on the card.
Serial13_24.jpg
Output repeats::
received UART 3: A
RCV UART 1: A
recevied UART 4: B
RCV UART 2: B

Moved Serial3 wires to Serial5 as on CARD labeled to link Serial1<>5::
recevied UART 4: B
RCV UART 2: B
received UART 5: A
RCV UART 1: A

From code:
Code:
void setup() {
  Serial1.begin(115200);
  Serial2.begin(115200);
  Serial3.begin(115200);
  Serial4.begin(115200);
  Serial5.begin(115200);
}

void loop() {
  int incomingByte;

  if ( !(millis() % 1000 ) ) Serial1.print( 'A' );
  if ( !((millis() + 500) % 1000 ) ) Serial2.print( 'B' );
  delay(1);
  if (Serial1.available() > 0) {
    incomingByte = Serial1.read();
    Serial.print("RCV UART 1: ");
    Serial.println((char)incomingByte);
  }

  if (Serial2.available() > 0) {
    incomingByte = Serial2.read();
    Serial.print("RCV UART 2: ");
    Serial.println((char)incomingByte);
  }

  if (Serial3.available() > 0) {
    incomingByte = Serial3.read();
    Serial.print("received UART 3: ");
    Serial.println((char)incomingByte);
    Serial3.print((char)incomingByte);
  }
 if (Serial5.available() > 0) {
    incomingByte = Serial5.read();
    Serial.print("received UART 5: ");
    Serial.println((char)incomingByte);
    Serial5.print((char)incomingByte);
  }

  if (Serial4.available() > 0) {
    incomingByte = Serial4.read();
    Serial.print("recevied UART 4: ");
    Serial.println((char)incomingByte);
    Serial4.print((char)incomingByte);
  }
}
 
I ran the test code here too. Everything seems to be working properly with the wires connected as documented on the card.

sc.png
(click for full size)

DSC_0875_web.jpg
(click for full size)

Hopefully you can clearly see in this photo how I connected the wires for all 3 ports.
 
Good, BTW - mine was T_3.6 - which of course uses the same PCB. And my altered code loops back to sender using the same port so both RX and TX are confirmed for #3, #4, #5 and of course #1 and #2.
 
Well, there is something wrong in my setup, and I will have to find out.
I the meantime I will continue to develop my prototype with my awkward cable routing.

I want to thank you very much for your excellent support

Here is a picture of my prototype, basically its reading 5 laser TOF rangefinders and
transmit data over serial to ArduPilot as it is used for avoidance on a quadcopter.

Please note that I rerouted Uart6 on pins 35-36 (cut the runs and jump wired) to make it easier to interconnect.

POC_MINI.jpg
 
Colors seem about right if the rangefinders are wired the same internally. You could swap the plugs and test or pull the wires from the Teensy and test like in my p#6 sketch/setup
 
I found the error, its hard to see on picture but Uart 2 & 3 where offset by a pin making all my logic fail because I was just looking at RX
So its back to normal...

Case closed , thanks again for your support
 
Status
Not open for further replies.
Back
Top