- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Deni,
I just got the same problem like ermes. I'm using XMC4500 relax kit and started with the example "CAN_EXAMPLE_XMC45". It works well in "loopback" mode. Then I disabled loopback mode, and connected Can1Tx with Can2Rx and Can1Rx with Can2Rx (ie P1.12 -> 1.5 and 1.13 -> 1.4) and both the Request_Node and React_Node returned "XMC_CAN_NODE_STATUS_LAST_ERROR_CODE".
So I followed your suggestion to ermes and add the following Code "Request_Node_LMO_01_Config.mo_ptr->can_mo_ptr->MOCTR = CAN_MO_MOCTR_SETTXRQ_Msk | CAN_MO_MOCTR_SETTXEN0_Msk | CAN_MO_MOCTR_SETTXEN1_Msk;" right after CAN_transmit. in following are creenshots of the request (CAN_NODE1) and react (CAN_NODE0) nodes.
Can you tell me, why do I have the error after disable the loopback mode? Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Orla ,
- To migrate from loopback mode to physical pins, it can be checked if all the pin configurations are properly configured for CAN TX, RX modes.
- You can also check if the pins are connected with a transceiver in between or without a transceiver.
- If they are connected with the transceiver connection would be as shown below
- If there is no transceiver involved. The connection would need to be as shown below
You can follow the below steps for testing
i) configure the pins properly as required for CAN,
ii) remove the loopback mode configuration.
Then do the following tests
a) Have a transceiver connected to the transmitting CAN node and check with a CAN analyzer.
b) Check the TX and RX lines of transmitting lines using Saleae and decode using inbuilt Saleae CAN analyzer and check if the CAN transmission is proper.
c) Connect the two CAN nodes via transceiver and check the behavior.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Orla ,
- To migrate from loopback mode to physical pins, it can be checked if all the pin configurations are properly configured for CAN TX, RX modes.
- You can also check if the pins are connected with a transceiver in between or without a transceiver.
- If they are connected with the transceiver connection would be as shown below
- If there is no transceiver involved. The connection would need to be as shown below
You can follow the below steps for testing
i) configure the pins properly as required for CAN,
ii) remove the loopback mode configuration.
Then do the following tests
a) Have a transceiver connected to the transmitting CAN node and check with a CAN analyzer.
b) Check the TX and RX lines of transmitting lines using Saleae and decode using inbuilt Saleae CAN analyzer and check if the CAN transmission is proper.
c) Connect the two CAN nodes via transceiver and check the behavior.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Orla,
as Alakananda said, this wont work without Transceivers, this is no RS232. The CAN Controller Rx needs to see what's going on on the Tx line, but may only drive the bus low, hence the diodes suggested.
I would recommend using real transceivers.
Regards,
funkyluke