Hello, EveryOne
I'm newbie to CAN protocole and embedded software. I need some help with the famous protocol CAN. The MCU that I use is LPC1768 and I have an evaluation bord MCB1700.
I need to use my MCB1700 to communicate with an equipement by CAN Communication. This equipement are using a special CAN protocol.
Here is the CAN protocol:
CAN 2.0A Std, 500Kbps, CAN ID : 0x401 Frame Format : [START][SESSIONID][COMMAND][LENGTH][DATA][CRC][END]
1) [START] ( Length : 1byte ) Start Byte for each frame Value : 0x7B (Fixed) 2) [SESSIONID] ( Length : 1byte ) Session IDentifier. EVSE Controller have to send same SESSIONID with received REQ SESSIONID. 3) [COMMAND] ( Length : 1byte ) COMMAND Code. Refer to '2.Command' sheet. 4) [LENGTH] ( Length : 2byte ) Data Packet Size Byte Order: Little Endian 5) [DATA] ( Length : 0~254byte ) Maximum data size : 254bytes Byte Order: Little Endian 6) [CRC] ( Length : 1byte ) XOR(exclusive-or) sum of all bytes from [COMMAND] to [DATA] 7) [END] ( Length : 1byte ) End Byte for each frame Value : 0x7D (Fixed)
According to the description, the length of data could be 254 bytes!
As I know, the CAN open protocole could transfert 8 bytes in one frame and the CAN FD protocole could transfert at most 64bytes.
My question is: 1. Can I use my MCB1700 to send a can frame more than 254 bytes? 2. If yes, should I re-write the can drivers provided by keil? 3. To send a data 254 bytes, how long will it occupy the CAN bus?