AnsweredAssumed Answered

CAN/CAN-FD Drivers LPC5461X Devices

Question asked by shaunoldale on Sep 25, 2019
Latest reply on Sep 26, 2019 by shaunoldale

Does anyone know the status of the CAN/CAN-FD drivers (see Software Section of


The driver is documented in "LPC5461x CANFD Driver API.pdf"


Is this still active?

Has it been replaced by the MCAN driver in MCUXpresso SDK.


There appears to be an issue with the CAN_TransferSendBlocking function. Occasionally the function does not return, waiting for the appropriate bit to be set in the CAN TXBRP register (Tx buffer request pending register), see below.


status_t CAN_TransferSendBlocking(CAN_Type *base, uint8_t mbIdx, can_frame_t *txFrame)
    /* write the message to the message buffer */
    status_t status = CAN_WriteTxMb(base, mbIdx, txFrame);
    if (status == kStatus_Success)
        /* wait for completion */
        while (!(base->TXBRP & (1UL << mbIdx)));

    return status;


Should this blocking loop be looking at the TXBTO (Tx buffer transmission occurred register) instead, e.g


        /* wait for completion */
        while (!(base->TXBTO & (1UL << mbIdx)));


We have used this CAN driver in a couple of projects without any issue, where we are using only one of the CAN modules. The project where the function does not operate uses both available CAN modules, but I don't see why this should be having any effect.


Does anyone have any information/ideas?


Thank you.