FLEXCAN Receiving Issues

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

FLEXCAN Receiving Issues

ソリューションへジャンプ
2,807件の閲覧回数
davidzhou
Contributor V

Hi,

I have K60 Towerboard, _K60P144M150SF3RM, with MQX4.2, and CodeWarrior 10.6.4.

I have a weird FlexCan issue. I have 10 MBoxes for Rx-ing. and 2 for Tx-ing. First 5 MBoxes are used for receiving specific CANIDs with Masks set for ID matching. and Next 5 Rx-ing MBoxes for generic CAN IDs. But only for Extended CAN IDs. 

The network has only extended CAN ID (No standard IDs).

The system is working for hours and days. There are more than 10 nodes in the systems.

Occasionally, the first MB stops receiving the CAN ID suddenly. It is confirmed that the CAN ID is on the networked and transmitted, because it can be received by other nodes. If it happens, that CAN ID will not be received until a software reset.

When I debugged into the issue, I found that the interrupt of receiving is not triggered for that specific ID only. Other receiving MBs (9 MBoxes) are still be able to receive the messages. And transmission is also working.

There are no error bits being set. If it is sets, they are cleared at end of the receiving Interrupt ISR, anyway. If this happens, a software reset fixes itself.

I also confirmed that the missing CAN ID is not received in any other MBoxes, Because the receiving ISR is not triggered at all.

My code is FlexCan based in the installation folder of examples for K60.

With your expertise, if you could give me some hints or suggestions that will be a great help to me.

Thank you,

David Zhou.

0 件の賞賛
返信
1 解決策
2,528件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi David:

I would suggest you check the CAN Mask registers value when this issue happened.  To check if the register is changed by some unexpected behaviors?  Also you can disable other tasks, only let CAN module work to see whether this issue still exists.

Regards

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
2,529件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi David:

I would suggest you check the CAN Mask registers value when this issue happened.  To check if the register is changed by some unexpected behaviors?  Also you can disable other tasks, only let CAN module work to see whether this issue still exists.

Regards

Daniel

0 件の賞賛
返信
1,714件の閲覧回数
bharathn3402
Contributor III

Hi David,

I’m using the MPC5775B microcontroller with FlexCAN. During runtime, the FlexCAN suddenly stops receiving standard CAN IDs, even though the CAN IDs are present on the bus. However, it can still receive extended CAN IDs and can send both standard and extended CAN IDs. The system returns to normal functionality after resetting the MCU. What could be causing this issue, and how can it be resolved?

Here’s how I’m initializing the transmit and receive message boxes:

 

// Configure Transmit box FLEXCAN_DRV_ConfigTxMb(INST_FLEXCANC, 0, &FlexCAN_transmitMsgInfo, 0x69); FLEXCAN_DRV_ConfigTxMb(INST_FLEXCANC, 1, &FlexCAN_transmitMsgInfo, 0x69); // Configure Receive box FLEXCAN_DRV_ConfigRxMb(INST_FLEXCANC, 2, &FlexCAN_receiveMsgInfo, 0x210); FLEXCAN_DRV_ConfigRxMb(INST_FLEXCANC, 3, &FlexCAN_receiveMsgInfo, 0x210); FLEXCAN_DRV_ConfigRxMb(INST_FLEXCANC, 4, &FlexCAN_receiveMsgInfo, 0x210); FLEXCAN_DRV_ConfigRxMb(INST_FLEXCANC, 5, &FlexCAN_receiveMsgInfo_ext, DUMMY_CAN_ID_2); FLEXCAN_DRV_ConfigRxMb(INST_FLEXCANC, 6, &FlexCAN_receiveMsgInfo_ext, 0x210);

i used global mask to accept to receive all the canids

 

 

0 件の賞賛
返信
2,528件の閲覧回数
davidzhou
Contributor V

Hi Daniel,

The individual RX mask register is confirmed that they are not changed or accidently modified.

Thank you,

David Zhou

0 件の賞賛
返信
2,528件の閲覧回数
davidzhou
Contributor V

The CAN is working ok. I close this post.

Thank you,

David Zhou

0 件の賞賛
返信