Why does the RX error counter increase while only sending?

6-Channel CAN FD Interface for High-Speed USB 2.0
Post Reply
martinmoe
Posts: 13
Joined: Fri 19. May 2017, 11:58

Why does the RX error counter increase while only sending?

Post by martinmoe » Tue 19. Nov 2024, 13:23

Hi,

I am sending CAN messages with CANAPI4 with CAN_MSGTYPE_SINGLESHOT. When there is no cable connected, I see an increasing RECEIVE (RX) Error Counter (REC), when there is a cable mit termination restistor but no other node ACKing, I see TRANSMIT (TX) Error Counter (TEC) increasing.

Why does the REC increase when I only send?

PCAN USB X6 Firmware is 3.3.2.

PEAK-System
Support
Support
Posts: 14
Joined: Tue 31. Aug 2010, 12:42

Re: Why does the RX error counter increase while only sending?

Post by PEAK-System » Tue 19. Nov 2024, 13:39

Hello,

In this case you would need to self-acknowledge the frame, as there is not other node involved.When no cable is connected, the CAN controller doesn't receive any valid signal or ACK from the network. In this case, the controller doesn't even detect its own transmitted frames correctly, leading to receive errors.

BR

Marvin

martinmoe
Posts: 13
Joined: Fri 19. May 2017, 11:58

Re: Why does the RX error counter increase while only sending?

Post by martinmoe » Wed 20. Nov 2024, 06:56

Hello,

thank you for your explanation. For the self-ack reason I am using the SINGLESHOT Feature of the CANAPI4.

But: When the REC increases during transmitting without cable, why does it not count down again when transmitting succeeds afterwards (after connecting a proper cable to a proper other CAN node)? Is there any way to make the REC count down without actually receiving frames?

It's no show stopper, but users might be irritated by the REC stuck at 136 and the interface LED on the device not being green anymore although communication is up and running.

Kind Regards
Martin Mödlinger

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: Why does the RX error counter increase while only sending?

Post by M.Heidemann » Wed 20. Nov 2024, 08:47

Hello Martin,

Singleshot does not self-acknowledge on its own,
it will just not retransmit after error detection as it would do due to the
default behavior in CAN.

You can use CAN_PARAM_TX_SELF_ACK to set the self-acknowledgment active.

Once acknowledged the counter should decrease again.

BR

Marvin
---
Marvin Heidemann
PEAK-Support Team

martinmoe
Posts: 13
Joined: Fri 19. May 2017, 11:58

Re: Why does the RX error counter increase while only sending?

Post by martinmoe » Wed 20. Nov 2024, 09:12

Hello Marvin,

that's good news!

CAN_PARAM_TX_SELF_ACK is not defined in my version of CanApi4 (Header version 4.1.2 with CanApi4.dll version 4.2.0.128).

Is it possible to use this feature with this version somehow?
Do I need a new version of CanApi4?

Kind Regards
Martin Mödlinger

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: Why does the RX error counter increase while only sending?

Post by M.Heidemann » Wed 20. Nov 2024, 09:16

Hello,

Please contact us via email regarding this.

BR

Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply