[Ovmsdev] OVMS v2 Memory/Settings Corruption

Michael Balzer dexter at expeedo.de
Fri Nov 25 23:19:12 HKT 2016


That's much more likely, yes.

Besides standard configuration data, the Twizy code uses the EEPROM for
the battery capacity average and to store the active tuning profile. So
there are more updates to the EEPROM than with other vehicles, but there
are no writes to the phone number slot, and there's no large number of
writes.

PIC18 spec D120: Byte endurance = min. 100K, typ. 1M. So if the profile
number feature byte for example is rather bad, and I change my profile
10 times a day (normal: 0), it will wear out after 27 years. IMO there's
no way this could be wear related.

A bug in par_write() would need to confuse both par_value[] contents and
destination address... unlikely. Looks more like some buffer overrun
that accidentally also triggers a call to par_write().



Am 25.11.2016 um 10:07 schrieb Mark Webb-Johnson:
> That really sounds like something writing to EEPROM (but confused and
> writing the wrong thing).
>
> I see in vehicle_twizy.c there are a lot of par_write and par_set.
> Also some in vehicle_kiasoul.c.
>
> Could it be a large number of writes either going through the write
> cycles of EEPROM, or perhaps showing up a bug in params.c par_write()
> function?
>
> Regards, Mark
>
>> On 25 Nov 2016, at 4:38 PM, Julien Banchet <jaxx at jaxx.org
>> <mailto:jaxx at jaxx.org>> wrote:
>>
>> Oh ! This one is impressive
>> Definitly not bit flip nor single caracter screw-up:
>> My phone number became "Topping o"! (I was far from topping off, and
>> the OVMS was plugged 15 minutes before charging the Twizy)
>>
>> Screenshot this morning
>> https://goo.gl/photos/6Yv9TUTTHmQTLosT8
>>
>> JaXX./.
>>
>>
>> On Fri, Nov 25, 2016 at 8:16 AM, Julien Banchet <jaxx at jaxx.org
>> <mailto:jaxx at jaxx.org>> wrote:
>>
>>     Sorry, I only gave flaky examples because I switched phones
>>     recently and was lazy to digup the old one that had some screenshots
>>
>>     Here are some real cases
>>     C33651886877
>>     +336518867s7
>>     +3365188T877
>>     +336518868h7
>>
>>     That said, it still is way more than a simple bit flip, and only
>>     corrupts the phone number as far as I can recall.
>>
>>     I have no explanation, all I can say is, most of the time, I plug
>>     the OVMS when I plan charging later in the morning, usually when
>>     I'm still underground and a handful of seconds before putting
>>     contact (if this can point to any clue)
>>
>>     Anyways, gonna try cutting GPRS this morning and see how quick it
>>     discharges and might automate switching SMS<->SMSIP once in a
>>     while to keep an eye on the battery (my cell operator has an API)
>>     though it might wearout eeprom even more :-/
>>
>>     JaXX./.
>>
>>
>>     On Fri, Nov 25, 2016 at 1:56 AM, Mark Webb-Johnson
>>     <mark at webb-johnson.net <mailto:mark at webb-johnson.net>> wrote:
>>
>>         $ perl -e 'printf "%08b\n",ord("5");'
>>         00110101
>>         $ perl -e 'printf "%08b\n",ord("k");'
>>         01101011
>>         $ perl -e 'printf "%08b\n",ord("8");'
>>         00111000
>>         $ perl -e 'printf "%08b\n",ord("Z");'
>>         01011010
>>
>>         Strange. Seems more than a simple bit flip. I haven’t seen
>>         this myself, or heard of it much from other users.
>>
>>
>>
>>
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.teslaclub.hk <mailto:OvmsDev at lists.teslaclub.hk>
>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20161125/244df313/attachment.htm>


More information about the OvmsDev mailing list