CAN Shield dropping packets

Hi. I’m using a atmega328 16Mhz arduino with the CAN receive demo program that’s included in the MCP 2515 library by seed. I’ve noticed that when placed on a very heavily loaded CAN network 250K, approx 1% of the CAN messages get dropped. If i max out the CAN line using an overpriced CANcase, the arduino/mcp start dropping ~5% messages.

The CAN example dumps everything to the uart, so originally i figured the uart was the problem. Unfortunately increasing the uart to 230400baud didn’t help.

Any ideas on what it could be? I’d REALLY like to use the arduino since i can interface it with python so easily.

test setup: Use canCase to transmit a 29bit id with 8bytes of data (rolling counter in the data) every 1 second. Then set up a few more (different) ids to transmit every 1msec. Log what the arduino spits out with putty. Let it run for a couple minutes then open the putty log with notepad++ filter out all the data getting logged every 1 second. Examine the rolling counter and see if any data was missed.

This recreates what i was seeing on our product: CanCase was receiving this 1 sec periodic message on a crowded can network, but the arduino was occasionally missing it.

I see the checkError which looks at the ‘REGISTER 6-3: EFLG – ERROR FLAG’ from the mcp 2515 datasheet. Guess i’ll start watching what that is saying

nevermind it was the uart that was slowing it down. That being said, the max rate you can read and tx can messages on an atmega328 at 16Mhz is around 1Khz. Commercial devices are good to about 5 times that.

guess i’m going with a teensy LC.