Announcement

Collapse
No announcement yet.

Flashing the MK60 with ZCP software

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Bry5on View Post

    Agree with Heinz, I think there’s some misreading between all of us.

    My read is that the non-m came first and had the icy weather half-delete for traction control programmed in (as they did from factory). Then in the M cars they commandeered that code to create a looser street driving and more feature-complete street mode instead. Then one step further, they decided to finally implement it in the CSL which is when they put the effort into properly tuning it and giving it a dedicated button. Once they had it dialed for the CSL, it was an easy drop-in for the ZCP. That’s my educated guess at least, not that m-track exists in the non-m.
    OH! That makes complete sense. You're probably right. Thanks!
    Phoenix Yellow e46m3 Build Thread
    Orient Blue E46 330i ZHP k24/dct/turbo Build Thread

    Comment


      Lots and lots and lots of sweeping IO addresses later, I think I have a vague lead on a potential flash path.

      Long, dense and somewhat unstructured text post incoming. Just gonna dump what's floating around in my brain here.

      I had been operating under the assumption that the modules used Motorola's SGFM flash (marketing term for some proprietary structure) because the module responded similarly to what's described in the SGFM datasheets that Bryson and I (mostly Bryson) found. The datasheets make it clear that you can be either in user or supervisor mode when executing instructions. Supervisor is just full auth, while user has some limitations. By default, everything runs in user mode, but you can elevate to supervisor with a special Motorola recipe.

      (It's not really all that special, just mfcr to a specific register and done. Path is well documented in the datasheets and the FW uses it all the time for ASIC comms and other IO.)

      To do supervisor mode reads, you need to probe via the RAM routine method, so that you can elevate properly beforehand. The mfg diag protocol reads run in user mode.
      ​
      Supervisor mode reads reveal an extra address block at 0xEFFF00-ish. Most addresses are referenced in the FW and are just ASIC/IO/interrupt handers. BUT, the lower section is only ever touched once on init and the values in those registers sorta match the SGFM flash controller shape.

      Today, however, I learned that before SGFM came CMF and CMFR flash, which match up waay nicer to the values in our registers. The biggest difference (for our purposes) between SGFM and CMF/CMFR flash is how they're programmed. The former can drive its erase/flash charge pump with its internal 3.3V supply, while the latter needs an extra 5V supplied to it from an external source (e.g. a robot on the assembly line) to the Vpp pin on the MCU.

      The CMF/CMFR datasheet mentions some status bits in the flash controller registers that need to == 1 before the flash can be erased or programmed. Comparing between the values of said registers on my 817.3 and 820.3 modules, there was one bit that stood out because it was set on the 817.3, but unset on the 820.3. Had Bryson read this out on both his 818.3 modules (one on car and one on the bench) and they both read 0, just like the 820.3!

      So, leading theory is that there is some HW difference between the supposedly-flashable and supposedly-not-flashable modules relating to Vpp (missing 0 ohm resistor or similar). Flashable modules presumably have Vpp at 5V always (or at least ready to be armed) and report this status via the aforementioned register.

      Next step is to physically probe the 820.3 module I have cut open to try and identify Vpp directly on the MCU. If I find it, feed it 5V and see the status change, then that means I'm really onto something.
      2002 Topasblau M3 - Coupe - 6MT - Karbonius CSL Airbox - SSV1 - HJS - Mullet Tune - MK60 Swap - E86 Front Triangulation - ZCP Rack - Nogaros - AutoSolutions - 996 Brembos - Slon - CMP - VinceBar - Koni - Eibach - BlueBus - Journal

      2012 Alpinweiss 128i - Coupe - 6AT - Slicktop - Manual Seats - Daily - Journal

      Comment


        Does anyone have an 813.3 and the tools / skills to take a look at the register?

        Also of note the roughly period correct mcore CPU does indeed use CMFR flash per that datasheet. And it does specifically note needing external Vpp. Not sure if the pinout matches what we have, but it's probably a related product in general. Notably the CMF registers in that memory map don't line up with the addresses you found, but perhaps a different variant uses a different base address.

        Comment

        Working...
        X