Hi all, I am testing to configure node 2 and node 3 on module CAN1 to be linked to the inside can bus and out. My final aim is to transfer some data on cun node 1- 2 and receive it on can ...Read more
Hi all,
I am testing to configure node 2 and node 3 on module CAN1 to be linked to the inside can bus and out.
My final aim is to transfer some data on cun node 1- 2 and receive it on can nodes 1- 3 without any processing in the CPU.
no purifier configuration and messages to be transferred, no pack/ unpack function- just as simple as that loop back out.
so I set all needed configurations where I had the node working on normal mode( transfer and receive messages, filter, and messages defined), but also I removed the configurations of the filter and added to the configuration the needed flag
rc = canNodeConfig (& nodeConfig, reeCanNode);// set common configurations * nodeSfr = IfxCan_getNodePointer (nodeConfig.can,nodeConfig.nodeId); nodeSfr->NPCR.B.LOUT = 1;
for both nodes 1- 2 and 1- 3.
what eventually happens is that I send from an outside source and it looks like the CPU receives (no errors on the bus) but the other bus has errors on it.
how can I be sure that the messages entered into 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)?
Thank You
Read less
Hello, Connected to the internal CAN bus and loop back the messages received on node 2 to node 3 without any further processing by the CPU. To accomplish this, you can configure both nodes to operate in normal mode and enable loopback mode for node 2 using the LBP bit in the NPCR register. The LBP bRead more
Hello,
Connected to the internal CAN bus and loop back the messages received on node 2 to node 3 without any further processing by the CPU.
To accomplish this, you can configure both nodes to operate in normal mode and enable loopback mode for node 2 using the LBP bit in the NPCR register. The LBP bit sets the loopback mode for the node, allowing it to receive its own transmitted messages.
Here are the steps you can follow:
You can also use interrupts to receive messages on the nodes. You can enable interrupts for receive and transmit events and write interrupt service routines (ISRs) to handle the events. When a message is received, the corresponding receive interrupt will be triggered, and the data can be read from the received message object.
Kind Regards,
Alex Thomas
See less