Problem with MPC5674F Flexcan: Sending 29bits ID messages.

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

Problem with MPC5674F Flexcan: Sending 29bits ID messages.

Jump to solution
574 Views
quentincoret
Contributor I

Hello.

I think I posted my question in the wrong community so I post it again here.

I seem to have troubles setting up our MPC5674F processor to receive 29bits ID message on the Flexcan module. I can receive and send 11bits ID ok and we can send 29bit ID ok, but for some reason, I can't receive the 29bits ID messages I'm sending. The buffer stays empty and the IFRH doesn't get set.

What could be the problem?

I'm setting up the buffer the same way to receive and send (apart from the CODE field).

When setting up the exact same buffer in this part of the code with 11bits ID, it works perfectly. I can also send 29bits ID messages with no problem.

Thanks and regards,

Quentin Coret.

Tags (3)
0 Kudos
1 Solution
395 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Quentin,

Do you have the ID for the MB properly set? You did not share the code you have. With the header files the CodeWarrior uses do not use the byte access, instead use the register one. It can be following…

    /* subscribe FlexCAN_B's MB4 for Rx - extended frame format */

    FLEXCAN_B.BUF[4].CS.R = 0x00200000; /* Rx inactive + IDE */

    FLEXCAN_B.BUF[4].ID.R = 0x18E00011; /* MB 4 will look for ID = 0x18E00011 */

    FLEXCAN_B.BUF[4].CS.R = 0x04200000; /* Rx active and empty + IDE */

Hope it helps.

Regards,

Petr

View solution in original post

0 Kudos
1 Reply
396 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Quentin,

Do you have the ID for the MB properly set? You did not share the code you have. With the header files the CodeWarrior uses do not use the byte access, instead use the register one. It can be following…

    /* subscribe FlexCAN_B's MB4 for Rx - extended frame format */

    FLEXCAN_B.BUF[4].CS.R = 0x00200000; /* Rx inactive + IDE */

    FLEXCAN_B.BUF[4].ID.R = 0x18E00011; /* MB 4 will look for ID = 0x18E00011 */

    FLEXCAN_B.BUF[4].CS.R = 0x04200000; /* Rx active and empty + IDE */

Hope it helps.

Regards,

Petr

0 Kudos