AnsweredAssumed Answered

How to Maximize FLEXCAN Throughput?

Question asked by Brad Shelton on Sep 10, 2019
Latest reply on Sep 17, 2019 by Alexis Andalon

Hi everyone,


I'm trying to get the K20 series chip's CAN controller to have the highest throughput possible. I've configured my CAN 1 port at 500 kbps and am transmitting an extended (J1939) frame every 1 millisecond using IXXAT's CanAnalyser3 Mini (shown in attachment). When transmitting, CanAnalyser3 Mini shows that the busload is at 26% which should be easy. When I export the incoming frames from the CAN1 TTY port to a file, only 80% of the them are captured compared to how many frames are sent by the CanAnalyser. These frames are received by the CAN transceiver, parsed by the MCU,  and then sent to the OS which creates a virtual TTY port in /dev that allows me to echo/cat to.


I know this could be a problem with any of the parts in this communication channel, but I was hoping someone could help me maximize the throughput of the CAN controller on the K20 series MCU chip. I'm new to JTAG debugging and have been using printf statements to go about it, but from what I've read in the Technical Reference Manual, I think I can achieve this by maximizing the RxFIFO setting and the message buffer size (MAX_MB). Maybe there is a way I can enable Loopback mode on the CAN controller to test the throughput? Let me know what more information I can provide.