Welcome back to another late night with Tazzi and his unspoken discoveries.
I have been doing lots of PWM development recently, as per the Ford AU ECU bench setups, and recently learnt something that I found zero documentation online about.
For those that are not in the know, VPW and PWM are very similar in terms of the protocol layout, but there is one key different that I have found.
VPW does not appear to ever use 'inter frame response'(IFR), whereas PWM does. This is actually quite important, since the PWM ECUs appear to use the IFR as a way to recognize if the scantool has seen the response, if it has not, it attempts to resend the same message another two more times before giving up.
So what does this actually look like? Well.. here is an example:
Scantool sends 64,10,F1,9,0,CF ... 40microsecond delay... ECU sends IFR byte of 0x10... end of frame
ECU sends C4,F1,10,7F,9,0,0,0,11,AB... 40microsecond delay... Scantool sends IFR byte of 0xF1.. end of frame
The 40micro delay is meant to actually be around 50micros, to signify End Of Data (EOD), but, it appears the ECU determies anything over around 35micros as EOD since it sends its IFR byte after about 35-40microseconds from the last bit sent from the scantool. Another classic example of designs not quite sticking the a standards spec!
As I was not expecting any of this, I had to whip out the scope to spot what was going on. Below is a picture of both PWM negative and positive wires, I have highlighted the end of the last bit of a message sent to the ecu, and then the start of the IFR response. You can visually count 8 bits that occur (00010000= 0x10). Everything before that is the actual frame sent to the ECU.
I was surprised to not find a single person talk about this online, I realise its explained in the J1850 documents, but its not exactly well explained plus it doesnt stick to the standard very well. Ontop of that, the IFR appears to be completely pointless, I can send any single byte to the ECU after its sent its message back and it accepts it. Most J2534 tools and also ELM cables send 0xF1, but I sent every value from 00 to FF and every single one was accepted.
The IFR is controlled by a single BIT in the first byte of the header frame, bit 3, if this is 0 then an IFR is required, hence a byte of 0x64 (0110
0100) and 0xC4 (1100
0100) both required the IFR. Supposedly multiple bytes can be sent as an IFR, but these bytes are never passed back to the scantool, so its absolutely pointless.