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

Thread: Teensy 4.0 CAN-FD pin direction and pad connection

  1. #1
    Junior Member
    Join Date
    Nov 2019
    Posts
    15

    Teensy 4.0 CAN-FD pin direction and pad connection

    I'm planning to use a Teensy 4.0 on a custom PCB to receive (and in the future, perhaps send) CAN-FD frames (250kBaud arbitration, 2MBaud data).
    As a tranceiver, I plan to use a MCP2562FD (with the Vio pin, for 3.3V signal voltages).

    Question 1:
    Using UART for the connection, I'm used to connecting TX and RX to RX And TX (crossed). However, the manual for the IMXRT1060 on the Teensy says that:
    "FLEXCAN3_RX " is "FLEXCAN transmit pin. This pin is the transmit pin to the CAN bus transceiver."
    "FLEXCAN3_TX" is "FLEXCAN receive pin. This pin is the receive pin from the CAN bus transceiver."
    Which seems backwards. The same text is found for FLEXCAN2, but it's the "right" way around for FLEXCAN1. The info is on pages 2610 and 2611 here.

    Similarily oddly, the datasheet for the MCP2562FD says:
    "TXD" = "Transmit Data Input" and "The Dominant and Recessive states correspond to the Low and High state of the TXD input pin, respectively."
    "RXD" = "Receive Data Output" and "The Low and High states of the RXD output pin correspond to the Dominant and Recessive states of the CAN bus, respectively."

    So both of the devices seem to be wired counter-intuitively. That would mean I'd still connect TX to RXD and vice versa, but the directions are different to what I'd expected.
    On the other hand, if the IMXRT1060 manual is wrong there - and it's wired like on FLEXCAN1, I'd have to connect TX to TXD and RX to RXD.

    Question 2:
    I've found some nice options for connecting to the bottom pads of the Teensy 3.x series (with double row headers), but that doesn't seem applicable to the Teensy 4.0.
    I only need access to the CAN FD pads.
    The other options seem to be SMD headers, which seem to be higher than DIP headers; pogo pins, where I haven't found much information of reliability for fast signals like CAN; or castellated pads, which seem like they would work well, but the board would have to lay flat against my own PCB for them to connect well, which would then interfere with the bottom-mounted SMD resistors and capacitors.
    What is the most reasonable solution here? Or should I use an external CAN controller (MCP2518FD) instead?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,734
    #1> Paul posted a T4 Breakout on OSH, not sure if that is the same transceiver part - but that should show the wiring used.

    #2> space is a bit tight - watch those tiny SMD's on the T4 on the ODD underside pins- but TallDog/@loglow made a breakout ( still in Beta ) - and on that board he used a similar method of soldering a double row of pins to the T4 underside. I've made two of his beta boards work with that - One direct through holes to PCB and another socketed to those pins.

  3. #3
    Junior Member
    Join Date
    Jan 2017
    Posts
    17
    Quote Originally Posted by towe View Post
    Using UART for the connection, I'm used to connecting TX and RX to RX And TX (crossed).
    This is different with most CAN transceivers. Connecting TX with TX and RX with RX is right with the normal CAN on Teensy 3.x, too.

    On transceivers like MCP.... or TJA.... the input is called TX. Others like SN65.... use the pin names D and R instead of TX and RX.

  4. #4
    Junior Member
    Join Date
    Nov 2019
    Posts
    15
    #1 seems to be solved. On Paul's breakout board, FLEXCAN3_RX is connected to the RXD pin of the MCP2558FD, and FLEXCAN3_TX to TXD. That implies that the T4's MCU manual must be wrong (and all FLEXCANs are in fact to be connected as described for FLEXCAN1, not FLEXCAN2 or FLEXCAN3). I will also move my design to the MCP2558FD as found on the breakout board, since it comes with Silent instead of Standy mode.

    #2 I think that makes the SMD headers the most reasonable option. Since I only need two of the connectors, I'll probably try soldering a short wire to them, and then connect that to my PCB.

  5. #5
    Junior Member
    Join Date
    Nov 2019
    Posts
    15
    Quick update:
    #1 FLEXCAN3_RX (pad 30) goes to RXD on the MCP2558FD, FLEXCAN3_TX (pad 31) goes to TXD - and works perfectly.

    #2 I went with soldering thin wires on the pads. My Teensy has regulator breadboard headers attached to it, which then go through my PCB and are soldered on the bottom side. That gives me around 2.54mm of space between the PCB and Teensy - more than enough for the bottom mounted SMD components. I made a hole in the PCB below where pads 30 and 31 are. The wire goes through that hole, along the bottom side of the PCB, and then back through the PCB into holes for 2.54mm headers (0.1" / 2.54mm spacing, 0.04" / 1mm diameter), where they're soldered in place on the top side of the PCB. It works absolutely fine.
    Can't wait for Teensy 4.1 though.

Posting Permissions

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