I've recently compiled and executed the sci2can example for both the K60 and the K40. My next step was to disable the internal loopback mode so I could connect the two boards to run the external loopback demo.
Prior to connecting the two boards together I hooked each one to a scope to make sure the CAN bus activity was what I expected. What I noticed in both cases is that the same frame is continuously repeated which is not what I expected since the number of transmits specified to the FlexCAN_Write function is 1. Digging a little deeper I can see that the FlexCAN_PrepareAndStartTransmit function sets the CODE field of the message buffer to 0xC, SRR is 0, IDE is 0, RTR is 0 and DLC is 1.
Based on the description of the message buffer code for Tx buffers a CODE of 0xC and RTR of 0 should result in "Transmit data frame unconditionally once. After transmission, the MB automatically returns to INACTIVE state".
If I stop the debugger and manually set the CODE field of the MB to inactive, and then let the code continue execution the frame is no longer transmitted.
So my question is why is it that transmission doesn't terminate on it's own?