TC397 MCMCAN Loop back OUT mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AssafREE
Level 1
Level 1
10 sign-ins First like given First reply posted

Hi all
i'm trying to configure node2 and node3 on module CAN1 to be connected to internal can bus and out.

My final goal is to send some data on cun node 1-2 and receive it on can node 1-3 without any processing in the CPU.

no fiter configuration and messages to be sent, no pack/unpack function - just as simple as that loop back out.

so i set all required configuration where i had the node working on normal mode (send and receive messages, filter and messages defined), but than i've removed the filters configurations and added to configuration the required flag:

        rc = canNodeConfig(&nodeConfig, reeCanNode);  //set common configurations

        Ifx_CAN_N *nodeSfr = IfxCan_getNodePointer(nodeConfig.can, nodeConfig.nodeId);

        nodeSfr->NPCR.B.LOUT = 1;
 
for both node 1-2 and 1-3.

what finally happens is that i send from an outside source and it looks like the cpu recieve (no errors on bus) but the other bus has errors on it.

how can i be sure that the messages received to that node? will interrupt for TX/RX receive?
what should i do to test it correctly?
is the setup OK for my purpose? (loop back out)?
0 Likes
3 Replies
Aiswarya_A
Moderator
Moderator
Moderator
25 likes received 250 sign-ins 50 solutions authored

Hello, 

Could you please try enabling the LOUT bit for the node which is connected to the external CAN bus and enabling the LBM bit for the receiving node?

Kind Regards, 
Aiswarya.

Aiswarya_A
Moderator
Moderator
Moderator
25 likes received 250 sign-ins 50 solutions authored

Hi,
Is this issue solved? Could you please send the code snippet and the screenshot of the error you are getting if any?

Best Regards,
Aiswarya.

0 Likes

HI.
ive tried it with no success.
i had to set a full router in order to make that work.

0 Likes