Logo

M467 CAN FD not working with example code

, 2024年10月29日|
0
28
1

I'm using 2 M467HJ boards and has J8 connected to each other on H to H and L to L.

I flashed the sample code from m467bsp/SampleCode/StdDriver/CANFD_CANFD_TxRx on both two boards.

(I also tested others samples like Blinky, FreeRTOS and Template, they all work fine)

One of M467HJ board is running as a Slave and another is a Master but no data has been received by Slave due to the Master log shown "Failed to transmit message".

Can anyone teach me how to make this work?

BTW, I switched J8 but no lock.

Thanks.

回覆

  • Please add the following two lines after CANFD_Open():

    CANFD_Open(g_pCanfd, &sCANFD_Config);
    CANFD0->DBTP |= CANFD_DBTP_TDC_Msk;
    CANFD0->TDCR = 0x500;