AnsweredAssumed Answered

FlexCAN check if rx frame with DLC shorter than 8 is available

Question asked by Adria Perez on Jun 17, 2019
Latest reply on Jun 20, 2019 by Adria Perez



I am trying to read can frames by polling and, to check whether there a new frame available I check the corresponding bit from the IFLAG register. What I am seeing is that if the CAN message doesn't have a DLC equal to 8 bytes, then checking the IFLAG doesn't work. Does that make sense? Can anybody tell me how to check for a received frame no matter the DLC value?


I am using FLEXCAN0 through PTE4 and PTE5. The code line I use to check if there is a new frame is:

if ((CAN0->IFLAG1 >> 4) & 1)


Best regards,