MPC5777C MCAN stuck on TX buffer request pending

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5777C MCAN stuck on TX buffer request pending

跳至解决方案
944 次查看
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

 

标记 (1)
0 项奖励
1 解答
653 次查看
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 项奖励
4 回复数
667 次查看
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 项奖励
658 次查看
darq
Contributor III

Hello,

It is 3N45H.

Best regards

0 项奖励
654 次查看
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 项奖励
643 次查看
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 项奖励