I've had a Witty Pi 4 L3V7 for 3-4 weeks and have been using it with a Pi Zero. It seems the behaviour of the witty.sh script changed a few days ago as it stopped displaying (charging....) and (discharging...) on the voltage line.
On further investigation, after looking at the logic in the script, I modified it to output the Firmware ID, which should be 55 but it's 0. Any ideas anyone ?
| |
| Witty Pi - Realtime Clock + Power Management for Raspberry Pi |
| |
| < Version 4.14 > by Dun Cat B.V. (UUGear) |
| |
Firmware ID : 0x00
Firmware Rev : 0x05
Hi
I am having this issue which also happened a few days ago. I wonder if their framework has gone askew?
Power Delay Limit (Witty Pi 4 L3V7) – – Technial Support / Discussion – UUGear ForumUUGear
The firmware ID is saved at the first byte in EEPROM in ATtiny841.
In Witty Pi's firmware, the EEPROM is synchronized to the I2C registers. However the first 16 registers (16 bytes in EEPROM) are not writable. The code that write an I2C register (and the corresponding EEPROM byte) can be found here.
I have no clue why and how the firmware ID is gone. I believe reflashing the firmware to device can restore the firmware ID, however if you decide to do so, you may want to check and remember the current value of I2C register #37 (I2C_CONF_RTC_OFFSET) first. This value should be wrote back to the place after you reflash the firmware.
If you search this forum, you will find more information about how to reflash/update firmware.
Now I review this topic and I think it was due to the lack of B.O.D.
Without enabling B.O.D. (by correctly setting the fuses), if the input voltage drops to too low (can't keep the MCU running stably), there is chance that the data in EEPROM (especially the first byte) get lost.
We already started the process to enable B.O.D on Witty Pi 4 models, however it will take some time spread to inventory.
Users may reflash/upgrade the firmware by following this tutorial, which will also enable B.O.D. (by setting the fuses to E:F5, H:DD, L:E2).