Pages: [1] 2
Author Topic: Saleae LA traces of communication disturbed by instruments cluster  (Read 22271 times)
setzi62
Full Member
***

Karma: +142/-0
Offline Offline

Posts: 249



I have logged the communication on K-line with the logic analyzer on two points:
 - at the OBD Connector's K-line wire
 - directly at the ECU's K-line wire
in order to show how the instrument cluster "disturbs" the communication.

The first logfile (FastInit_IngitionOff) contains communication while the instrument
cluster is off.  This shows identical data on both log points and good communication.

The second logfile (FastInit_IgnitionOn) shows how the instrument cluster
"disturbs" the communication:
- some initial echo test bytes 0x55 and 0xAA not coming through to the ecu
- data bytes after fastinit pulse getting destroyed, so ECU sees framing error.

The logfiles can be opened with the Saleae Logic Analyzer software
as descibed here:
http://nefariousmotorsports.com/forum/index.php?topic=568.msg4523#msg4523
Logged
Tony@NefMoto
Administrator
Hero Member
*****

Karma: +132/-4
Offline Offline

Posts: 1389


2001.5 Audi S4 Stage 3


« Reply #1 on: January 23, 2012, 11:05:02 AM »

Cool. Thanks for posting this.

Does the interference only occur on a particular year of car?

Does slow init work any better?

Logged

Remember you have to log in if you want to see the file attachments!
Info or questions, please add to the wiki: http://www.nefariousmotorsports.com/wiki
Follow NefMoto developments on Twitter: http://twitter.com/nefmoto
setzi62
Full Member
***

Karma: +142/-0
Offline Offline

Posts: 249


« Reply #2 on: January 23, 2012, 11:19:17 AM »

I don't think this is bound to certain model years of cars.
Just my guess is, the instrument cluster "problems" appear
more often on the european models.

I just had no time for taking more logs, but I will log also slowinit
scenarios. Might take til next weekend.
The slowinit works normally, but then the KWP2000 communication
is disturbed, and you can't use gaps in communication longer than about 200ms.
For some cars, even the slowinit doesn't work.
Logged
setzi62
Full Member
***

Karma: +142/-0
Offline Offline

Posts: 249


« Reply #3 on: January 30, 2012, 05:50:24 AM »

Here are some more traces of communication, this time started with slowinit.
For all logs, channel 0 is at the OBD connector side and channel 1 is at the ECU's side of the K-line.
Several effects of the instrument cluster are visible in the traces:
- disturbance of the connection setup, making necessary a second connect attempt.
- disturbances during running communication session (single bytes disturbed, no
   further data passed to ecu).
Logged
Tony@NefMoto
Administrator
Hero Member
*****

Karma: +132/-4
Offline Offline

Posts: 1389


2001.5 Audi S4 Stage 3


« Reply #4 on: January 30, 2012, 12:41:14 PM »

From my quick look at the logs, it seems as though slow init works better than fast init for getting the instrument cluster to not disrupt the communication. Is that your conclusion as well?

I wonder if certain baud rates work better than others.
Logged

Remember you have to log in if you want to see the file attachments!
Info or questions, please add to the wiki: http://www.nefariousmotorsports.com/wiki
Follow NefMoto developments on Twitter: http://twitter.com/nefmoto
ArgDub
Full Member
***

Karma: +60/-1
Offline Offline

Posts: 202


« Reply #5 on: January 31, 2012, 01:21:21 PM »

I wonder if certain baud rates work better than others.

There are certain baud rates that are unreachable to the c167 running at 24MHz. I investigated this back when I was writing my eeprom programmer and found that in boot mode, at 38400bps, the BR deviation is greater thar 2.5% which is the maximun allowed for a reliable communication.
Using the virtual com port I'm limited to use one of the UART's standard baud rates, but the FTDI libraries allows a much larger number of baud rates to choose from. I wonder at how much higher than 56700bps you can establish communication, that speed doesn't make sense to write the 95040 but would be nice to squeeze a few more sps from the data logger or the flash sw.
Logged
Tony@NefMoto
Administrator
Hero Member
*****

Karma: +132/-4
Offline Offline

Posts: 1389


2001.5 Audi S4 Stage 3


« Reply #6 on: January 31, 2012, 02:42:48 PM »

There are certain baud rates that are unreachable to the c167 running at 24MHz. I investigated this back when I was writing my eeprom programmer and found that in boot mode, at 38400bps, the BR deviation is greater thar 2.5% which is the maximun allowed for a reliable communication.
Using the virtual com port I'm limited to use one of the UART's standard baud rates, but the FTDI libraries allows a much larger number of baud rates to choose from. I wonder at how much higher than 56700bps you can establish communication, that speed doesn't make sense to write the 95040 but would be nice to squeeze a few more sps from the data logger or the flash sw.

setzi and I have done a lot of tests on supported baud rates. The 1.9.2.0 version of the NefMoto software now includes higher default baud rates. Also, if you have a premium feature NefMoto license you can auto detect all supported baud rates.
Logged

Remember you have to log in if you want to see the file attachments!
Info or questions, please add to the wiki: http://www.nefariousmotorsports.com/wiki
Follow NefMoto developments on Twitter: http://twitter.com/nefmoto
ArgDub
Full Member
***

Karma: +60/-1
Offline Offline

Posts: 202


« Reply #7 on: January 31, 2012, 03:37:40 PM »

Premium features are great!! flashing takes 52s with the fast flash. I'll give v1.9.2 a try soon, I'm still using v1.9.1.2.
Logged
Tony@NefMoto
Administrator
Hero Member
*****

Karma: +132/-4
Offline Offline

Posts: 1389


2001.5 Audi S4 Stage 3


« Reply #8 on: January 31, 2012, 05:32:53 PM »

Premium features are great!! flashing takes 52s with the fast flash. I'll give v1.9.2 a try soon, I'm still using v1.9.1.2.

If you do a "Detect Supported Baud Rates" and select the max speed, then flashing is even faster now.  Grin
Logged

Remember you have to log in if you want to see the file attachments!
Info or questions, please add to the wiki: http://www.nefariousmotorsports.com/wiki
Follow NefMoto developments on Twitter: http://twitter.com/nefmoto
setzi62
Full Member
***

Karma: +142/-0
Offline Offline

Posts: 249


« Reply #9 on: February 01, 2012, 10:28:40 AM »

From my quick look at the logs, it seems as though slow init works better than fast init for getting the instrument cluster to not disrupt the communication. Is that your conclusion as well?

I wonder if certain baud rates work better than others.
I can just say fastinit never works in my configuration due to instrument cluster.
Slowinit 0x11 works most times, but communication then is really unstable.
What you can see in the logs is happening always when you have some gaps more than a few 100ms in communication.
No way to have e.g. 2seconds idle, then send testerPresent.
The last logfile of slowinit shows what also often happens with communication - cluster just stops transmitting to ecu.

All these things happen independent of a certain baudrate, so neither staying at 10400 nor going down to 9600 or up
to whatever rate helps in this case.

Only way to have stable communication with the cluster in the way is after double slowinit to 0x01.
A slowinit 0x01 seems to tell the cluster to be in pass-through-mode.
Logged
setzi62
Full Member
***

Karma: +142/-0
Offline Offline

Posts: 249


« Reply #10 on: February 01, 2012, 10:36:24 AM »

There are certain baud rates that are unreachable to the c167 running at 24MHz. I investigated this back when I was writing my eeprom programmer and found that in boot mode, at 38400bps, the BR deviation is greater thar 2.5% which is the maximun allowed for a reliable communication.
Using the virtual com port I'm limited to use one of the UART's standard baud rates, but the FTDI libraries allows a much larger number of baud rates to choose from. I wonder at how much higher than 56700bps you can establish communication, that speed doesn't make sense to write the 95040 but would be nice to squeeze a few more sps from the data logger or the flash sw.

I think FTDI controlled by VCP allows to set same baudrates as when using the direct FTDI driver.
On ecu side, the highest baudrate working for ALL ecu frequencies is 125000 baud, the max speed
settable from ecu side is 250000baud, which doesn't work on the slow/old 20MHz ecus.

It more depends on your cable or better on the K-line to 5V converter which speed you can handle.
Most converter chips are specified up to 12000baud, so I doubt that 250000baud will work cleanly,
even if the FTDI chip itself can handle this.
With my cheap cable I can log at 125000baud without problems (100 variables with 50sps  Smiley).
Logged
ArgDub
Full Member
***

Karma: +60/-1
Offline Offline

Posts: 202


« Reply #11 on: February 01, 2012, 02:30:19 PM »

Thanks, now I'm running me7logger at 125kbps. Is there any way to reduce driver's latency? That's my problem now, going from 57.6k to 125k only gives 8% more sps with 20 bytes message length, but change is noticeable with longer messages, with 249 byte msg len I get a 50% improvement.
Logged
carlossus
Sr. Member
****

Karma: +38/-0
Offline Offline

Posts: 394

Leon Curpa Stg1+


« Reply #12 on: February 01, 2012, 02:36:38 PM »

Might be relevant...

http://nefariousmotorsports.com/forum/index.php?topic=409.msg2714#msg2714
?
Logged
Tony@NefMoto
Administrator
Hero Member
*****

Karma: +132/-4
Offline Offline

Posts: 1389


2001.5 Audi S4 Stage 3


« Reply #13 on: February 03, 2012, 05:05:43 PM »

Thanks, now I'm running me7logger at 125kbps. Is there any way to reduce driver's latency? That's my problem now, going from 57.6k to 125k only gives 8% more sps with 20 bytes message length, but change is noticeable with longer messages, with 249 byte msg len I get a 50% improvement.

Increasing the baud rate speeds up data transmission speed, but it does not decrease time between messages. The biggest bang for your buck with high data rates, is when you send large data packets. To decrease the time between messages, you need to get the ECU to do less work, and you need send messages to the ECU with the minimum allowed time between responses.
Logged

Remember you have to log in if you want to see the file attachments!
Info or questions, please add to the wiki: http://www.nefariousmotorsports.com/wiki
Follow NefMoto developments on Twitter: http://twitter.com/nefmoto
Tony@NefMoto
Administrator
Hero Member
*****

Karma: +132/-4
Offline Offline

Posts: 1389


2001.5 Audi S4 Stage 3


« Reply #14 on: February 03, 2012, 05:07:30 PM »

I can just say fastinit never works in my configuration due to instrument cluster.
Slowinit 0x11 works most times, but communication then is really unstable.
What you can see in the logs is happening always when you have some gaps more than a few 100ms in communication.
No way to have e.g. 2seconds idle, then send testerPresent.

Does using the AccessTimingParameters messages to extend the P2 or P3 timeouts help? I would assume for this to work, the instrument cluster would have to eavesdrop on these messages to the ECU.
Logged

Remember you have to log in if you want to see the file attachments!
Info or questions, please add to the wiki: http://www.nefariousmotorsports.com/wiki
Follow NefMoto developments on Twitter: http://twitter.com/nefmoto
Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.023 seconds with 17 queries. (Pretty URLs adds 0.001s, 0q)