Other Parts Discussed in Thread: HALCOGEN
I'm experiencing a lot of unreliable CAN start-up. There are times when CAN starts up nicely, and messages flow between my two Launchpads without problems. Then there are times when CAN does not start up nicely and nothing flows between the two Launchpads.
The code on each Launchpad node, 1 and 2, calls canInit() to initialize the communication. What I find is that if I kick off canInit() on the two nodes within a certain "time window" of each other, then traffic flows fine. However, if the canInit() is outside this window, then both nodes get stuck indefinitely in canIsTxMessagePending(), wherein a transmit messagebox is filled (pending), but no transmit happens. I've tried both just ignoring the pending situation and calling canTransmit() with another message or clearing the transmit pending bit, but neither way "unsticks" the messagebox. I've also tried setting Halcogen to use "Enable Auto Bus On" to no avail.
I'm pretty sure this has to do with the inane CAN protocol flaw wherein a transmitter "aborts" its transmit if no receiver is there to pick up the message (receiver clears a "I'm listening" bit in the message on the bus), and perhaps the TI CAN implementation. If I put a Kvaser Leaf Lite analyzer probe on the CAN bus, then data flows fine, since the analyzer actively clears the bit in the message on the bus. What a flawed protocol, wherein an analyzer has to be _intrusive_ for data to flow and be monitored.
Are there any ways around this major bug, or am I dead in the water?
Thanks for all help.