AnsweredAssumed Answered

CAN Query

Question asked by Robert Gilmore on Jan 26, 2017
Latest reply on Feb 17, 2017 by Hui_Ma

I am trying to get a CAN system operating between two separate TWR-K60D100M / TWR-SER bds elevator systems, using CW 10.4 and the can_loopback_node bare-metal example.

I have split the can_loopback_node program, with one set to only receive CAN messages, and the other to only transmit to try and understand the operation.

I only have about 0.5m of CAN bus, with the J5[9-10] linked on the TWR-SER module to give the 120ohms termination resistor at both ends of the CAN bus on both systems.

I am operating at a 50kbps CAN bus speed.

I can transmit one CAN message from one node which is then received by the other node. The oscilloscope trace indicates only one CAN message is transmitted.

If I transmit two or more CAN messages, the transmission is not occurring until both CAN messages have been loaded in to the Message Buffer – what can cause that when transmitting more than one CAN message ?.

It appears as though with multiple CAN messages, the first one ends up not being acknowledged for an undetermined delay, and then the second one is transmitted – though again multiple messages are being transmitted – presumably due to an ACK not being initially received, but after the ‘repeat’ CAN messages, the node set to receive receives both CAN messages correctly, ID and data.

I had expected interrupts to be generated, but adding breakpoints on the associated ISR’s are not being executed. As far as I can see polling is not used so what is happening when a CAN message is being successfully received?.


Looking at the bits after the CRC when one CAN message has been transmitted gives 0,1,0 on the CAH_H – CAN_L trace, but this ie 011 when more than CAN message is transmitted.

I am looking for guidance on what to check – my knowledge on CAN being still rather basic.