CAN/CAN-FD Drivers LPC5461X Devices

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CAN/CAN-FD Drivers LPC5461X Devices

ソリューションへジャンプ
759件の閲覧回数
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.

ラベル(1)
タグ(3)
0 件の賞賛
1 解決策
557件の閲覧回数
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 件の賞賛
2 返答(返信)
558件の閲覧回数
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 件の賞賛
557件の閲覧回数
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 件の賞賛