I'm working with the CAN module on a Concerto, set to 1 Mbit/s, and the timing seems off. I calculate a message length of 64 data bits + 34 bits of overhead = 98 bits/message for a standard CAN format message. Therefore the time it takes to transmit a message should be 98 us, but when I look at it on a scope I get a waveform that is 114 us wide, which is 16% longer than I expect. We also sent messages with 4 and 6 bytes, with a consistent 16% discrepancy in the length of the message.
Here is the code for setting up the CAN module:
CANInit(CAN0_BASE);
CANClkSourceSelect(CAN0_BASE, CAN_CLK_M3);
CANBitRateSet(CAN0_BASE, SysCtlClockGet(SYSTEM_CLOCK_SPEED), 1000000);
CANIntEnable(CAN0_BASE, CAN_INT_MASTER | CAN_INT_ERROR | CAN_INT_STATUS);
IntRegister(INT_CAN0INT0, CANIntHandler);
IntEnable(INT_CAN0INT0);
Any ideas on what might be causing this?
Thx