I am very confused with the following scenario. I am using a PIC microcontroller, and I am transmitting a continuous sequence of messages. According to CAN protocol I need to give some time before I transmit the next message.
To solve this problem I started checking for the Tx buffer is full or free before transmitting. But my only problem is I can't continuously be in the
while loop checking for the flag as there can be a possibility the bus is not available, and it can never come out of the
while loop. How do I avoid this tricky situation? The microcontroller I am using is in the dsPIC family.