Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN,
I'm testing out the CAN interface between the TMS570LS12x MCU on a TMS570LS1224 Hercules Development board with the Cortex R4F MCU and the TMS570LC4357 without any interface devices (I'm just using a breadboard and some CAN transceivers). I'm using the CAN driver files generated from HALCoGen (can.c and HL_can.c), and I'm trying to figure out the best way to send and receive multiple messages (with the goal of being able to send over larger messages and files using CAN).
Currently, I've had a bit of success by calling a sleep() function in between my canTransmit() calls on the transmitting end and checking canIsRxMessageArrived() and calling canGetData() multiple times on the receiving end, but my intuition tells me this is not the ideal way of doing it.
I've seen in some other forum posts that it's possible to set up some sort of buffer to receive the messages but I haven't been able to figure out how to code this.
I'm wondering if using a sleep() function when transmitting calls and continuously calling canIsRxMessageArrived() / canGetData() is the appropriate way to do things or if you can suggest a better method? If so (ex: by using some sort of buffer), is there any example code somewhere that demonstrates what something like this might look like?
Thanks