I building off the CAN driver for the C21 Xplained Pro board to migrate code written for an 8 bit Freescale processor to the SAMC21. This code transmits and receives J1939 style PGN's. The example code works just fine, but I need to transmit multiple messages (PGN's) within a timed 1ms interrupt. If I stagger the messages in different interrupts it works fine, but if I do 2 or more in the same interrupt only one transmits. It would seem like the driver should choose the next available buffer and return a status code if they are full. The example code the way it is written seems to hardcode for one buffer, CAN_TX_BUFFER_INDEX (defined as 0), unless I'm reading it wrong. If anyone can point me in the right direction to expand on this driver I would appreciate it.
Joined: Wed. May 17, 2017
Posts: 30 View posts
Last Edited: Wed. May 17, 2017 - 09:30 PM