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.
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”:
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.
To calculate I use this calculator: http://www.kvaser.com/support/calculators/bit-timing-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)
T2=2
BTQ=16.
Now all I need is calculate BRP.
Clock after pre-scaler is: BTQ250kbps=15250kbps=4Mhz
That means that BRP=120/4=30.
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.