CANBUS gets flooded with tderror and rderror

schollie1000
Wed, 20 Jan 2021 12:35:22 +0000
Mbed OS

Hello MBed Forum,

my student team and I want to use a CAN network to gather data over a small sensor network.

The sensors should react to a specific CAN-message which tells them in what time interval the sensor should post its readings to the network (we are using a STM32F103 which are equipped with SN65HVD23 CAN transceivers).

At first, we had problems with the MBedOS CAN filter, but found another way around it (Only a single CAN filter can be used with STM32F4xx devices - #2 by jeromecoutant). Now the sensor just receives messages with the specified identifiers in the filter. Everything works if every Message is properly acknowledged, however if one message does not get acknowledged due to poor connectivity or something else the chaos starts. The sending controller now continuously posts a transmit error message and all the receiving controllers transmit an error message. This only stops when both controllers are reset.

The Mbed documentation suggests a reset(), but our efforts have shown that triggering this can.reset() command only resets the TDerror or RDerror counter and therefore does not solve our problem.

Is this a common error or is there a specific strategy that we do not know of which could solve this problem?

Any help would be appreciated and many thanks in advance!

5 posts - 2 participants