MPC5777C MCAN stuck on TX buffer request pending

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

MPC5777C MCAN stuck on TX buffer request pending

Jump to solution
838 Views
darq
Contributor III

Hello,

What i'm trying to do is to use a M_CAN interface on our custom board. I tired to use the source code snippets from one of the examples available from this forum:

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5777C-MCAN-simpleTXRX-GHS616/ta-p/110...

I'm just using M_CAN1 to send the messages instead of M_CAN0 and the receiver is just a Kvaser interface. I have configured the pins 195 and 196 as alternate function (0x3) to use them as M_CAN1 interface. The external oscillator is used as interface clock.

The problem that i'm facing is that when i try to send any message from dedicated buffer then i can see that the bit for buffer 0 is set in TXBRP but the message is never sent and the state of the TX pin also never changes, it stays constantly high. I can see the message RAM is updated with a frame data and i also tested that when using TEST register i can set and reset the TX pin state. I can't really see any errors in the registers (see attached screen).

Any ideas why the interface never sends the message? In case more info is needed please don't hesitate to ask.

Best regards

 

Tags (1)
0 Kudos
1 Solution
547 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

another hint from register values; after leaving init mode the PSR[ACT] is still 0, it indicated the module is not synchronized to the bus, so cannot start transmission. It can be due to wrong pin configuration or the RX pin is seen low. You can try to disconnect transceiver and connect TX/RX pins together.
Did you set respective IMUX register as well to select pin you are using?

PetrS_0-1712659366643.png

For 3N45H example you can refer to  https://community.nxp.com/docs/DOC-342013 

BR, Petr

View solution in original post

0 Kudos
4 Replies
561 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I see ACK error is detected, from register view, but in this case I expect error counters set as well and TX signal should be visible.
What is MCU mask set used in fact, there is little difference between 2N45H and 3N45H.

BR, Petr

0 Kudos
552 Views
darq
Contributor III

Hello,

It is 3N45H.

Best regards

0 Kudos
548 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

another hint from register values; after leaving init mode the PSR[ACT] is still 0, it indicated the module is not synchronized to the bus, so cannot start transmission. It can be due to wrong pin configuration or the RX pin is seen low. You can try to disconnect transceiver and connect TX/RX pins together.
Did you set respective IMUX register as well to select pin you are using?

PetrS_0-1712659366643.png

For 3N45H example you can refer to  https://community.nxp.com/docs/DOC-342013 

BR, Petr

0 Kudos
537 Views
darq
Contributor III

Hello,

Yes, it looks like there was a bug in the software resulting in IMUX registers being overwritten with wrong values resulting in selecting incorrect input for M_CAN1 RX pin.

Thank you for help.

Best regards

0 Kudos