This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS: F28M36x: CAN status after CANMessageSet - shows still TX'ing even though data was sent



Tool/software: TI-RTOS

I have a project using two F28M36x parts on separate PCBs, connected via CAN bus.  My CAN::Send() method boils down to this:

    CANMessageSet(CAN0_BASE, 32, &msgObject, MSG_OBJ_TYPE_TX);
    status = CANStatusGet(CAN0_BASE, CAN_STS_TXREQUEST);
    long ulTimer = 2500 * CAN_SEND_TIMEOUT_MS;
    timeout = false;
    while (status != 0) {
        if (--ulTimer < 0) {
            timeout = true;
            break;
        }
        status = CANStatusGet(CAN0_BASE, CAN_STS_TXREQUEST);
    }

If 'timeout' is true, this code will be re-executed.

The problem is that CANStatusGet() is sometimes returning 0x80000000, which I believe indicates that the transmit has not yet completed.  Since I need to guarantee delivery, the code re-sends the message. The odd part is that the data is actually sent, regardless of the value returned by CANStatusGet(). 

Am I using the CANStatusGet() API call correctly?  Is there a different way to determine that the data was actually sent?

Hmm... is there some errata that I've missed regarding either the CAN API or the F28M36x CAN controller?

Thanks!
     -- Steve G.