Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

usb8476 Full Diag Frame

Hi,

 

I'm trying to run diagnostic communication with USB8476 LIN interface.

 

For that I use "LinMasterSendFullFrameAnd Receive.vi" (under LW7.1).

 

NI-CAN driver is 2.6 .

 

Please see attached screenshot of the result:

  - what does LinBusError 10 40 01 02 mean ? (it is not listed in NI documents)

 

The same frame returns correct response BUT with Vector CANCardXL interface. 

 

Thanks in advance 

0 Kudos
Message 1 of 12
(8,946 Views)

Apparently the documentation needs to be updated to include a missing error frame. I have filed the relevant requests to have that done.

 

The error should be documented as:

 

Error Name                            Error Code (hex)    Description

LinBusErrorTxSyncTimeout         1040                  The LIN interface master task attempted to send a

                                                                           sync byte and did not self not receive the sync byte

                                                                           within the timeout period.

 

If you have a scope, you could look at the LIN bus to see what it looks like. Do you see a proper SYNC byte (0x55) go across the bus after the break?

 

If I were to make a guess, I would assume that you are overterminating your bus. I see that you have termination enabled on board. Do you also have termination in your cable or somewhere else on the bus? If you had too much termination, it could degrade the signal and that could cause the LIN transceiver not to self-receive. I would try disabling termination (checkbox in upper left corner of example).

0 Kudos
Message 2 of 12
(8,938 Views)

Yes, I see 0x55 sync byte after ~800us break field...

 

Voltage level is OK too...

 

I don't use any additional terminated resistors ...

 

I tried with switched On/OFF SW termination but result is the same...

 

When compare both oscillograms, USB8476 and CANCardXL, it seems there is a difference in baud rate (or interbyte space ?) - it is difficult to fix it... But voltage level is OK for both...

Message Edited by pgo on 09-16-2009 10:20 AM
0 Kudos
Message 3 of 12
(8,934 Views)
See attached screenshots for Sync byte - USB8476 and CANCardXL
Download All
0 Kudos
Message 4 of 12
(8,931 Views)

... Here is attached a full frame sent:

  - by USB8476

  - by CANCardXL
 

Download All
0 Kudos
Message 5 of 12
(8,926 Views)

From what I can see, they both look like they are running at the same baud rate. The differences from what I can see is that:

 

NI: 13-bit time break, ~80us extra space between each byte

Vector: 19-bit break time, 0us space between each byte

 

The LIN spec calls for a >= 13-bit break time, so both are in spec

The LIN spec calls for the total time of a transfer to be <= 1.40 * minimum time. If a byte takes ~520us at 19.2kBaud, this allows for each byte to take ~208 extra us. The 80us of the NI board is well within tolerance.

 

I am seeing the waveforms look a little different, but both of them appear to be fully within spec and I would expect them both to work.

 

0 Kudos
Message 6 of 12
(8,903 Views)

Hi,

 

Meanwhile, I modified VI by adding header sent after full frame (see attached .zip)... 

 

But first, second, and sometime third run of .vi gives 0x8400 error (see attached "LinBusErr"screenshot) ... after that correct frame is received (see "LinBusOk" screenshot) ... 

 

Can You look over .vi ???

 

May be something is wrong ??? 

Download All
0 Kudos
Message 7 of 12
(8,900 Views)
What is your LIN slave?
0 Kudos
Message 8 of 12
(8,885 Views)

Electronic module for car wiper motors...

LIN tranceiver - TJA1020, ST microcontroller...

Only diagnostic frames are used - DLC = 8, MasterRequest=0x3C, SlaveID=0xA0, SlaveResponse=0x3D 

 

Request frame to sent is:  A0 02 10 84 FF FF FF FF

Positive response is: A0 02 50 84 00 00 00 00

Negative response is: 7F 10 F0 00 00 00 00 00

 

 To get postitve response, module power must reset (power on/off) ... But positive response is obtained after 2...4 times request sending followed by LIN bus error 84 00...

 

 After positive response is get,  each frame request  returns negative response ...

 

In short: LIN bus error 84 00 ... is returned only after slave power reset untill positive response is returned. 

  

0 Kudos
Message 9 of 12
(8,879 Views)

How does that behavior differ from the Vector behavior? The 84 error just means that the slave didn't respond. Is it possible that the slave takes a certain amout of time to startup and until that time, it is not really doing LIN communication? That explains the 84. Then, it returns 1 positive and N negative responses.

 

If you power cycle the hardware and then wait a couple minutes, does it follow the same trend?

 

0 Kudos
Message 10 of 12
(8,875 Views)