Page 1 of 1
Connectivity issues
Posted: Sat Dec 06, 2014 8:34 pm
by spags
Hi, I've been trying to connect to TS today to get the car tuned and have run into issues using both methods of communication (ttl and microusb).
No jumper pin:
Dev console works fine.
TS - Says "Invalid data recieved from controller"
Dev Console says:
Code: Select all
2014-12-06 16_28: EngineState: TunerStudio: invalid size: 32768
2014-12-06 16_28: EngineState: ERROR: size
2014-12-06 16_28: EngineState: TS RX on PC11/TX on PC10 @38400
2014-12-06 16_28: EngineState: TunerStudio total/error counter=95/72 H=0 / O counter=0 size=116 / P=0 / B=0
2014-12-06 16_28: EngineState: TunerStudio W counter=0 / C = 0 / P = 0 / current page 0
2014-12-06 16_28: EngineState: page size=10008
2014-12-06 16_28: EngineState: le_formulas 6280
2014-12-06 16_28: EngineState: crankingCycleBins 9600
2014-12-06 16_28: EngineState: engineCycle 344
Using the jumper pin:
Devl console works fine: I get the whole shebang from message one.
TS works fine:
What's broken: ADC values are wrong, TPS is fixed at 70something and the WBO chanel does not respond. I verified this on the bench by grounding the WBO channel. No reaction while console switch is active, goes to 0 under normal operation. This starts hapening after i reboot the board with the jumper, not when i install the jumper.
Was hoping to tune the engine today, can't do it if i don't get reliable AFR's.

Re: Connectivity issues
Posted: Sat Dec 06, 2014 9:10 pm
by AndreyB
invalid size: 32768
all this looks
a) transmission error has happened
b) error recovery takes too long and you give up on it
I am not sure what is the root cause at this point - but it kind of works, you just need to push all the TS buttons and give it some time.
Maybe a better error-recovery in the protocol handler is possible, maybe one day we will find the root cause and reduce the error ratio. As an option you might want to play with lower serial speed and see if that would help (TS serial speed used by rusEfi is configurable -
set_ts_speed SPEED
Re: Connectivity issues
Posted: Sat Dec 06, 2014 10:03 pm
by spags
Thx, lowered baud rate to 19200, it works now! WBO channel bench test check out. Will test in-car later tonight and tune this sucker.
Still there is that issue with the ADC channels freaking out when console switch pin is grounded. Didn't find a ticket for that.
Will definitely look at error recovery in the ts code later, hopefully i may be able to help some there.
Re: Connectivity issues
Posted: Sat Dec 06, 2014 10:08 pm
by AndreyB
spags wrote:Still there is that issue with the ADC channels freaking out when console switch pin is grounded. Didn't find a ticket for that.
I have PB1<>GBD jumper and my coolant sensor gauge looks to be functional - I am testing with a potentiometer.
Does your coolant sensor work with PB1<>GND jumper? I am not sure if I understand steps to reproduce.
Re: Connectivity issues
Posted: Sat Dec 06, 2014 11:14 pm
by spags
Ok, here are the steps to reproduce, on the car and on the bench. On the bench test by grounding the channel to the case, crude but should work. Should rig up a pot for validation. On the car i test by comparing the reported voltage to the actual voltage on the line as tested my by meter. Test are carried out back to back without disturbing the harness.
On the bench:
Jump PB1<>GND
Restart board and connect through dev console using ttl port (/dev/ttyUSB0 in my case)
I checked with the TPS and AFR channels. They have values consistent with a floating pin.
Ground ether wire, value does not change significanly.
On the car:
Start engine with PB1<>GND.
TPS value returns 78%
AFR shows 16.5
Measure the voltage on the pin, and you get 1.6 (consistent with 9-10 in this WBO sensor).
Counterexamples. (How it works)
On the bench:
Repeat without grounding the PB1 Pin.
Grounding those same channels and checking the value with analogInfo returns 0 on those pins when they are grounded.
On the car:
Repeat without grounding the PB1 pin.
TPS shows actual position of throttle.
WBO shows sane values.
Also here is a dump of analogInfo on the bench to. This lists what sensor channel is connected to what ADC.
Code: Select all
2014-12-06 19_06: EngineState: TPS ADC2 slow PA2 rawValue=0.01025/divided=0.02051v
2014-12-06 19_06: EngineState: CLT ADC12 slow PC2 rawValue=2.29084/divided=4.58168v
2014-12-06 19_06: EngineState: MAF ADC0 slow PA0 rawValue=0.01172/divided=0.02344v
2014-12-06 19_06: EngineState: AFR ADC3 slow PA3 rawValue=2.29670/divided=4.59340v
2014-12-06 19_06: EngineState: MAP ADC4 fast PA4 rawValue=0.00000/divided=0.00000v
2014-12-06 19_06: EngineState: A/C sw ADC1 slow PA1 rawValue=2.29377/divided=4.58754v
2014-12-06 19_06: EngineState: Vbatt ADC14 slow PC4 rawValue=8.00776/divided=16.01553v
Re: Connectivity issues
Posted: Sun Dec 07, 2014 1:25 am
by AndreyB
Re: Connectivity issues
Posted: Sun Dec 07, 2014 3:08 am
by AndreyB
WOW. This was SUCH a lame bug
part of USB initialization code was setting pins PA2&PA3 to UART mode for no reason, apparently was copy-pasted together with the rest of the code.
depending if USB was initialized for console or Tuner Studio it was initialized before or after ADC, so that's how PB1 is involved.
Fixed in #5715
Re: Connectivity issues
Posted: Sun Dec 07, 2014 1:27 pm
by spags
Confirmed fixed on the car!