Boards falsely indentified as "TeslaM3"

Post Reply
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Boards falsely indentified as "TeslaM3"

Post by johu »

I just realized that under certain conditions a board is detected as a TeslaM3 modboard in place of what it really is.

The reason is that the detection tests the precharge pin. On all hardware it is connected to either a FET or an NPN transistor but on the modboard it is tied to Vcc. So the pin reads as high on the modboard and low on all others. Mostly.

The bug occurs when precharge is implemented via a MOSFET instead of NPN. That is on both Tesla SDU and LDU boards. When you simply power up the board there will be no problem but if you do a soft reset e.g. after a firmware update, the false detection occurs. That is because precharge is on in stop mode and the pin becomes floating in boot loader mode. So after the update the pin will still be high because of the FETs gate capacity.

On Tesla hardware that leads to faulty temperature calculation. Since the problem only occurs after a software update and is fixed by power cycling I will just fix it in the next firmware release via boot loader pin initialization.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Boards falsely indentified as "TeslaM3"

Post by EV_Builder »

Why we don't build these versions with a variation point?
(In the make config?)

Or just use a Define #SDU LSU or M3...
With some scripting we can easily get all bin files build to upload to git etc. for my gut feelings this is asking for trouble if somehow the wrong version can damage the hardware some day.

Another option but less safe is safe the type in flash somewhere and compare with bin.
Or build the check in for each own version. Then if someone uploads the wrong one he is safe and gets a message.
This is also future proof for Board revisions someday :)
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Boards falsely indentified as "TeslaM3"

Post by johu »

Yes thats what I did originally but found it more user-friendly to auto-detect.
That said the M3 detection will be deleted because that will receive its own firmware for now.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply