2017-05-15 12:54 AM
We are having cases where Fuel gauge IC (STC3115) get stuck during Long run. It has been found that SDA remains low in this case. In order to recover from such situation I am planning to reset the fuel gauge.
Is there any method to reset the STC3115 IC other than Power-On Reset and Soft Reset ?
As per data-sheet the functionality of RSTIO is Reset Sense Input and Reset Control Output. Can we use this pin to reset the STC3115 chip ?
#stc3115-issue-startup #stc3115 #stc3115-i2c-issue-timingSolved! Go to Solution.
2017-12-07 04:32 PM
Hello,
The STC3115 doesn't have a dedicated pin to reset the device.Be careful, the RSTIO pin is not a reset pin of STC3115. But it is an optional feature to delay the reset of the rest of the system. This is meant to improve measurement accuracy during the first measurement after a system reset.The only ways to reset the IC are to use:
- Power-On Resetor
- Soft ResetIf the I2C communication is suddenly interrupted during an I2C_Read sequence without ending the I2C transaction properly, the slave device can be stuck with the SDA signal at a low level.This can occur due to any random I2C Master reset, or System reset or system shutdown. And it can happen with any I2C slave device (It is not specific to STC3115).An easy way to recover from this stuck situation is to send some dummy CLK signals (on SCL pin) until the previously interrupted I2C Read transaction finishes.
Best regards.
2017-07-22 06:49 AM
Antony,
Did you ever solve the issue of the STC3115 getting stuck on a 'long run'?
How long was a long run?
We're designing a high reliability device. So far we haven't seen a case of the STC3115 being stuck but I want to be able to deal with it if it does.
2017-12-06 07:23 AM
Hi Erik,
I mentioned long run because the issue was Random for us. Sometimes it occurs within 1 day or less, sometimes it takes 2-3 days.
We faced issues where either SCL or SDA line becomes low.
Fix for SDA low
Once we detect a SDA line low issue, the SCL and SDA pin configurations are changed to their alternate GPIO functionality (as output pins). Using this we generate clock in software for SCL line until the slave release the bus.The number of clocks would be random. In our code, we keep sending clocks until SDA line becomes high. After releasing the SDA line, we reinit the I2C module in master side.
Fix for SCL low
Since master is the only control of SCL line, and since slave has no effect on this, to recover the SCL low condition, we need to reset the master I2C Module.
2017-12-07 07:10 AM
Since we were not able to re-create the STC3115 getting stuck but we still need to be able to un-stuck it if this ever happens, we came up with a rather 'brute force' hardware solution: We are forcing a hardware reset of the entire chip!
Since the chip does a hardware reset when its supply voltage drops below 2.0 (Power-on reset threshold) we devised a hardware method to make this happen.
An automatic download link to a PDF of the circuit is here:
https://app.box.com/s/i07fy0j0ofm8b5q0ufrtof09a02se236
We haven't fully finished testing yet, but it appears to work as expected.
During the initial part of the reset, we are drawing a bit extra current from the battery but since we expect that the need for this reset will occur extremely rarely, if ever, this trade-off was deemed acceptable.
2017-12-07 09:03 AM
Antony,
Thanks for posting your solution.It's a lot more elegant than mine!
We're going to test it out and probably use it, as a first step, hopefully never having to use the hardware reset that I described above.
Does your method preserve the STC3115 registers and battery status?
2017-12-07 04:32 PM
Hello,
The STC3115 doesn't have a dedicated pin to reset the device.Be careful, the RSTIO pin is not a reset pin of STC3115. But it is an optional feature to delay the reset of the rest of the system. This is meant to improve measurement accuracy during the first measurement after a system reset.The only ways to reset the IC are to use:
- Power-On Resetor
- Soft ResetIf the I2C communication is suddenly interrupted during an I2C_Read sequence without ending the I2C transaction properly, the slave device can be stuck with the SDA signal at a low level.This can occur due to any random I2C Master reset, or System reset or system shutdown. And it can happen with any I2C slave device (It is not specific to STC3115).An easy way to recover from this stuck situation is to send some dummy CLK signals (on SCL pin) until the previously interrupted I2C Read transaction finishes.
Best regards.