How to Maximize FLEXCAN Throughput?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Maximize FLEXCAN Throughput?

1,310 Views
bradshelton
Contributor I

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.

Thanks,

Brad

Labels (1)
0 Kudos
1 Reply

1,139 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Dear Brad,

In this link you can find the SDK, this has some examples that can help you to develop your application. I will suggest to check the loopback/loopback_transfer example for what you want to do.

Best Regards,

Alexis Andalon