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

Thread: FlexCAN_T4 Send Extended CAN ID Message

  1. #1
    Junior Member
    Join Date
    Sep 2019
    Chicago, IL

    FlexCAN_T4 Send Extended CAN ID Message

    Hi All-
    I am working on a project where I am trying to send and received CAN messages with extended ID's. I am using a Teensy 4.0 with the FlexCAN_T4 library. The problem I am having is getting the library to switch from standard ID's to extended. Also the message data is incorrect along with the DLC. I am looking to get the CAN ID of 0x18FEDF00, but the Teensy is sending 0x63F instead. Any suggestions on making the library switch? I hope I'm just missing something simple. Take a look at the screenshot to see the traffic on CAN as seen from Vector CANalyzer.

    #include <FlexCAN_T4.h>
    FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> can1;
    CAN_message_t msg;
    void setup(void) {
    void loop() 
      msg.flags.extended = 1; = 0x18FEDF00;
      msg.len = 8;
      msg.buf[0] = 55;
      msg.buf[1] = 0;
      msg.buf[2] = 0;
      msg.buf[3] = 0;
      msg.buf[4] = 0;
      msg.buf[5] = 0;
      msg.buf[6] = 0;
      msg.buf[7] = 0;
    Click image for larger version. 

Name:	can_extended.jpg 
Views:	11 
Size:	39.7 KB 
ID:	23411

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Montreal, Canada
    are you on the latest github version? if not try that out

Posting Permissions

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