01-24-2025, 08:19 AM
(01-23-2025, 10:05 AM)franzthiemann Wrote:(01-20-2025, 11:04 AM)biketool Wrote:(01-20-2025, 09:52 AM)franzthiemann Wrote:(01-15-2025, 10:24 AM)biketool Wrote: I had to deal with this yesterday. I recalled that if you reboot a few times it would reset, no, that doesn't work.
Seems like rebooting is not what resets the controller, but waiting out the calibration error time of the controller
how much time for it to timeout?
I would guess that the RK818 is configured to 16 min.
The value is configured via bits 4 and 5 in the GGCON_REG (according to the datasheet). Possible options are 8 min, 16 min, 32 min or 48 min.
To get the exact time, one would need to check the register. This brings us back to the beginning: How to communicate with this chip?
I have been looking into this. It's on an i2c bus. On FreeBSD for example, I can do this to read the GGCON_REG:
Code:
i2c -a 0x1c -f /dev/iic1 -o 0xb0 -d r -c 1
On Linux though, there isn't even /dev/iic or /dev/i2c devices (there's iio:device but not sure if that's the same). There is /sys/bus/i2c/.. but that doesn't seem to work with i2c-tools. I'm considering compiling the rk818 battery driver and then dynamically loading it with modprobe so that I can experiment with changes to some of it's settings.