Awesome!
To Collins point about wiring, it is a bit fiddly, do you think this https://www.adafruit.com/product/2094 would fit?
Awesome!
Amazing that i missed that, especially given the amount of time i have spent watching every minute of all your long, boring but wonderful videos.Jack Bauer wrote: ↑Tue Oct 19, 2021 8:05 am No it wont fit. The pitch on the M3 jtag header is 1mm. So you need a female 1mm pitch header to match. Good news though! I already sourced one, designed a board around it, tested and then then made the whole thing opensource:)
Yes, the CAN messages have the bootloader and firmware version in them. And, yes, if you had a full image of the OEM software you could disassemble it and remove all the immobilizer checks leaving it otherwise the same. I have seriously considered this myself. In fact, I do have the M3 drive inverter firmware files.EV_Builder wrote: ↑Thu Oct 21, 2021 11:10 pm I was thinking of a stragedy:
Important is to catch the first few canbus messages of the M3 drive unit. They contain your actual software revisions. Bootloader and firmware versions.
Then i think it would be good to be able to copy Elon SW to disc and after init of the chip make some screenshot of the configuration registers of the peripherals.
after that flash it with our own software. And after that it would be cool if you can restore back to Elon in case we forgot something or if the project fails somehow.
If we got access to to the firmware of Elon why couldn't we eliminate certain checks like IMMO? Should be well possible....
Yeah, a lot of bad things might happen. The motor is, of course, permanent magnet so if power dies and the motor is rapidly spinning it will become a generator of hundreds of volts. Almost all of the alternatives are bad. If the motor controller just plain shuts off and stops all gate drive then the voltage will freewheel to potentially high voltage. In fact, I'd imagine that the motor can do field weakening so a failure of gate drive could cause excessively high voltage to present at the SiC mosfets. The other alternative is for some gates to still be conducting. That's bad because now unregulated current is flowing, either to bad places or back to the battery. The gates could short the motor which is just a recipe for disaster at high power.
I doubt this would be hard - the first thing the code will be doing is initialising registers,memory etc., and also, chances are it will be at a nice round address, as this would need to be constant for all versions.And, the bootloader somehow knows where in flash to start executing after it is done so it's kind of tough to figure out where to start disassembling the main firmware at.
You are correct, if you know the bytecodes for common init opcodes you could search for those to find functions. Functions generally initialize the stack nearly the first thing so if you can figure out the opcode for that you can search for functions. Additionally, most functions are going to end in an op code for "return". Some architectures use RET, some might use various jump instructions like JL for jump to link register. But, it will be very common to find function epilogues that are consistent. So, yes, it's possible. But still we would need to know whether they jump to a static place in FLASH or whether the bootloader looks for a magic set of bytes or what. I've seen processors where the start function really is found via searching a few ROM locations for the magic bytes. Tesla could be doing that.mikeselectricstuff wrote: ↑Fri Oct 22, 2021 4:26 pmI doubt this would be hard - the first thing the code will be doing is initialising registers,memory etc., and also, chances are it will be at a nice round address, as this would need to be constant for all versions.And, the bootloader somehow knows where in flash to start executing after it is done so it's kind of tough to figure out where to start disassembling the main firmware at.
That settles it then.mikeselectricstuff wrote: ↑Sun Oct 24, 2021 6:09 pm The just replied to my YT comment - it is Tesla 2021 firmware.
The not great thing about using the drive-train as-is is that Tesla can jam a stick in your spokes any time they'd like. I mean, once it's out of the car the firmware won't change. But, they are free to change the firmware to lock out things like this for future motors out of cars. Naturally, it's probably still possible to downgrade if you have the motor on the bench. But, that would require them to have people send their motors in or only buy the motors from them. I guess that's not so bad from a business perspective as it causes a nice form of market capture for them. But, yeah, it certainly leads down a much more restricted and secret road than what OI is doing.mikeselectricstuff wrote: ↑Sun Oct 24, 2021 6:09 pm The just replied to my YT comment - it is Tesla 2021 firmware.