On Thursday I got stuck into the additional CAN message project. As a recap the idea here is to add an additional function into the 0401 program binary to send an additional CAN message.
I've given the new message the ARBID of 0x7D0 which makes it lower priority than all other CAN messages. The format of the message is:
There's basically 4 parts to achieving this:
1: Create a new function that replicates the existing function to send CAN messages from the DME. It needs to be recreated as we need space for the extra instructions to call an additional CAN message.
2: Modify the 10ms task to point to our new function instead of the original.
3: Load our new CAN message definition into the CAN config table in the program ROM.
4: Create a new function to assemble the new CAN message and push the frame to the CAN buffer.
The fun part is that this needs to be done by modifying the machine code in the binary, no easy way to write assembly or C here!
I got the above done on Thursday, spent code-checking it and then flashed it to my car on Saturday morning. As soon as I turned the ignition on I could tell something was wrong as the DSC light was flashing. All modules relying on outbound CAN were throwing errors. A review of what I'd done revealed a dumb mistake. I was trying to use slot 17 of a 15 slot buffer 🤦♂️. Anyway it was an easy fix and v1.1 ran without issue, and I connected to the MK60 with INPA and could view live CAN data, so I knew the standard CAN messages were working fine.
I'm not actually set up for CAN logging so at this point I shipped the binary off to Bryson for further testing.
I was very excited to get this back from him showing the new message being logged:
Bryson then setup his logger with the appropriate conversion factors and has been able to log AQ_REL, Lambda Integrator, etc. at 100Hz instead of the 5Hz or so that you get over DS2. He's posted a link to the log which you can find in his post here
I'm super stoked that this has worked out. In addition to being very useful for tuning, it also proves that these sorts of modifications are possible and that the disassembly work is good enough to understand what's going on to the degree that it's possible to make working changes and additions to the program.
Also - the new wheels are in the country and should hopefully arrive end of next week. Tomorrow's job is sorting out tires.


Leave a comment: