Open BaptisteHudyma opened 3 weeks ago
Hi Baptiste, sorry you couldn't get it working. I haven't actually played with the library or device in over 4 years so can't really remember that specific functionality. I do remember that my device worked as I wanted and that involved doing some things that were opposed to the documentation. Anyway, glad you got yours working. Thanks
Hello ! Thanks for your work.
I noticed that almost all your registers read and writes are wrong, compared to the documentation (refer to the datasheet), and it breaks the charger logic & working operation.
EXEMPLE: the charge current register :
In the doc the charge current register is written in 2 bytes:
You notice that the data is 7 bit, splitted into 2 bytes, offseted by 6 bits. So the steps to write a register are :
So for the current register, if I want to write a 1 Amp charge current, I do the following (naive pseudo code):
Sorry of the long issue, but it took me several hours to debug the entire library, with a few burned components !
For anyone interested in a fix, I'll publish one when I'll make it cleaner.