Other Parts Discussed in Thread: BQSTUDIO
I am trying to configure a BQ28Z620 device on our custom PCB .... although the schematic is pretty much exactly the same as per the device TRM and evaluation module.
Connection via i2C from a RPi Compute Module 4.
Code is written in Python 3.
I am able to read and make sense of all the registers so can collect parameters such as battery voltage/current/temperature etc. This all appears to be working as expected.
The problem I am having is writing to the Data Flash so that I configure the device for our purposes.....
I can read back the DF and values are as per default values given in the Tech Ref Manual.
BUT all attempts to write to DF have so far failed to change the data stored within.
I have tried tried various approaches including writing exactly as described in the TRM. Register 0x3E + block [start address + data] ~ little endian.
I also tried calculating and writing checksum and length into the appropriate places at register 0x60 0x61
Also tried writing everything address/data/csum/length in a single i2C transaction.
Different boards, all virgin, show exactly the same behaviour.
Nothing changes and when I read back the DF data remains as per default values.
[ FYI - I am reading 0x0204 in Control Status register and 0x6100 in Operation Status register ] - There seems to be Multiple SEC bits as shown in the TRM and these are all different ????]
By default my battery is disconnected from the output terminals ..... I have a charging circuit but that is also disconnected from the battery.
Seems that CHG-FET is turned on but DSG-FET is still disabled.
This I think is because the configuration settings are not yet correct.
Questions -- what am I missing with writes to flash ?
Can the flash memory be write protected in which case how to I disable ?
Happy to share any code and schematics if appropriate !