CAN/CAN-FD Drivers LPC5461X Devices

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN/CAN-FD Drivers LPC5461X Devices

Jump to solution
722 Views
shauno
Contributor I

Does anyone know the status of the CAN/CAN-FD drivers (see Software Section of https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso54618-ca...).

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.

Labels (1)
0 Kudos
1 Solution
520 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Shaun Oldale,

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)));

yes, you can have a look at the MCAN driver under SDK:

pastedImage_3.png

pastedImage_4.png

 

Hope it helps,

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
521 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Shaun Oldale,

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)));

yes, you can have a look at the MCAN driver under SDK:

pastedImage_3.png

pastedImage_4.png

 

Hope it helps,

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
520 Views
shauno
Contributor I

Thanks very much for the reply.

Could you also confirm the status of these CAN/CAN-FD drivers?

Are they actively maintained or have they been replaced by the MCAN drivers in the MCUXpresso SDK?

0 Kudos