Teensy 4.0 CANFD with ACAN_T4 library

syrinxtech

New member
I have been using Teensy 4.0 with the ACAN_T4 library for CANFD for awhile now, and everything is running great. At one time I had 4 Teensy 4.0 and 1 Teensy 4.1 connected together using the NXP TJA1051T/3 CANBus transceiver. The issue I'm having is trying to get receive filters to work with CANFD. I have read and reread the issue described on page 55 of the ACAN_T4 documentation. From my sending station, I'm sending three frames, with an ID of 0xD4, 0xD5 and 0xD6. On the receiving side I only want to receive the 0xD5 and 0xD6 frames. I create a filter for each value along with a catch-all filter. On the receiving side I end up getting all three frames and the filter index value is always 2, indicating the catch-all filter did it's job.

Does anyone have any experience with these issues? Here is the code I used to create the receive filters:

C:
ACAN_T4FD_Settings settings(1000000, DataBitRateFactor::x1);
const ACANFDFilter FDFilters[] = {
  ACANFDFilter(kData, kStandard, 0xD5, procRECVFDMsg),
  ACANFDFilter(kData, kStandard, 0xD6, procRECVFDMsg),
  ACANFDFilter(kData, kStandard, procRECVFDMsg)
};
const uint8_t numFilters = 3;
errorCode = ACAN_T4::can3.beginFD(settings, FDFilters, numFilters);

I'll be happy to answer any questions I can. Any help would be greatly appreciated.
 
Update.....I posted my issue to the Github repository and the author has already released an updated version (1.1.6). I have downloaded the code and will test it shortly. Kudos to him for such a quick response. He also mentioned an updated example sketch showing a large number of filters with CANFD.
 
Update....I tried the new ACAN_T4 library (1.1.6) and it fixes the issue with receive filters with CANFD.

Many thanks to Pierre.
 
Back
Top