CAN "BusOff" Error


I’m trying to interface fez cobra ii with pe3 ecu, using SN65HVD230 tranciever*.
Before trying to connect to the ecu, I verified that the communication is working by making a loop test - CAN1->CAN2 both via the transceivers and everything worked fine.
But, when I try to connect to the ecu, I get “BusOff” Error.

Something that I don’t understand is, is the fact that I got the error at least means that something IS working? I mean, it did recognize that something is not right…

*Rate of communication - 250kbps according to the ecu’s datasheet. no special configuration in the ecu required.

Code is here:

Any help would be much appreciated.

The only reason would be the bit timing.

Which product and which sdk are you using?

Thanks for the quick reply!

I’m using fez cobra 2,

ClrInfo.clrVendorInfo:                  Microsoft Copyright (C) Microsoft Corporation.  All rig
SolutionReleaseInfo.solutionVendorInfo: Copyright (C) GHI Electronics, LLC
SoftwareVersion.BuildDate:              Oct 23 2013
SoftwareVersion.CompilerVersion:        410713

I’ve just noticed that maybe that the BRP value is not correct.

Can you verify that this is correct?

[em]For the G120 this would be:

125KB - T1 - 15 - T2 - 8 - BRP - 20
250KB - T1 - 15 - T2 - 8 - BRP - 10
500KB - T1 - 15 - T2 - 8 - BRP - 5
1000KB - T1 - 7 - T2 - 4 - BRP - 20[/em]


CAN timing is critical for a good working system and all devices must use the same BIT RATE and “sampling point”.

A rate of 125Kbps for example using a 75% sampling point won’t talk to a 125Kbps system with an 85% sampling point.

What is the sampling point setting for your ECU?

I’ve checked all over the datasheet of the ecu, and it doesn’t say a thing about “sampling point”. The only thing mentioned is in this “CANBUS Application Note”:

that the rate is 250 kbps.

These values are correct for G120 and framework 4.2.

Thanks! for which sampling point are those values?

Nice one. Your protocol is based on J1939 so I found this on a website

J1939 CAN Parameters

SAE J1939-11 and -15 specify a network data rate of 250 Kbps with a minimum period of 3.998 us and a maximum period of 4.002 us. CAN networks also allow and require for custom sample point settings. For J1939, the sample point setting has a maximum value of 87.5%. Nodes should be set as close as possible but not exceed 87.5%. CAN peripherals also allow for synchronous jump width (SJW) settings of 1 to 3. The SJW value dictates how much time can be added or subtracted to the node’s CAN clock for syncronization purposes. J1939 allows only for a single SJW.

This is the website

Once you set your sampling point to this I am sure you’ll get it working. Good luck.

@ jonkerbox2 -

I don’t remember on witch sample point these values were calculated but i’m using this settings in automotive communication witch is SAE J1939.

1 Like


To calculate I use this calculator:
with the settings: 120MHZ,250kbps,0% allowed tolerance, MCP2510 (there is no option for SN65HVD230).
According to SAE J1939 sampling point should be 87.5% and SJW=1. This leaves me with only one option:

T1=14-1=13 (minus 1 because of sync)

Now all I need is calculate BRP.
Clock after pre-scaler is: BTQ250kbps=15250kbps=4Mhz
That means that BRP=120/4=30.

Can anyone verify?

OK, I will try with the following settings: 250KB - T1 - 15 - T2 - 8 - BRP - 10
and let you if it works in couple of hours. Thanks very much for your help.

It worked! Thank you very much!