cancel
Showing results for 
Search instead for 
Did you mean: 

STC3117 - Battery not Found

EWA STA
Associate
Posted on May 02, 2018 at 18:26

We are using the STC3117 connected to QCom msm8909 SoM booting into Android and are having problems getting it to start up correctly.

Once the battery is connected to our device it will never be removed, so we have tied the BATD pin to ground.

We are using the Driver found

https://github.com/st-sw/STGasGaugeLinuxDrivers

(link to GitHub).

I have added in debug messages to the driver and it looks like the check for battery presence in GasGauge_Task() is coming back 1 (not present).

This basically keeps the STC3117 in a restart loop.

I have attached a screen shot of all my debug messages (registry values and basic progress).

Besides connecting BATD to ground is there anything else that needs to be done to get the STC3117 to 'see' the battery?

#stc3117 #startup-problem
1 REPLY 1
EWA STA
Associate
Posted on May 03, 2018 at 19:39

Follow up with more information:

I added in a lot of debug messages and found that the default values contained in stc3117_platformdata_default.c were not being passed to the driver, causing it to have random values in the SOC Value table and the OCV table.  Also battery specific settings (capacity, internal impedance...) were not being set.

Thinking this could cause my issue above I moved those values/settings into my driver file and set them manually.

I am still getting the same error, the driver does not think a battery is connected. 

I also tried to modify the driver to ignore the BATFAIL flag, but this causes the SoM to not boot. 

So including the Battery not found issue above, does anyone know how to get Linux to use the settings in stc3117_platformdata_default.c when it loads the driver and calls stc311x_probe(...)?