Author Topic: Injoinic IP5328 I2C register map  (Read 4650 times)

0 Members and 1 Guest are viewing this topic.

Offline RossJTopic starter

  • Newbie
  • Posts: 8
  • Country: au
Injoinic IP5328 I2C register map
« on: July 08, 2020, 10:13:42 am »
Hi all,

I'm hacking a power bank which is based on the IP5328 SoC. I've found the datasheet (IP5328 in Chinese and IP5328P in English) which is helpful. However, while it describes the I2C interface in terms of how to access it, there is no information as to the register map. Does anyone know where this information might be documented? Perhaps they are using a defacto standard or an older chip has a similar map. Perhaps someone has reverse engineered some of the registers. Any help would be appreciated.

I'm particularly interested in the basics (all read-only) such as state of charge, voltage, current, charging status and whether external power is connected.

Cheers, Ross
 

Offline aix

  • Regular Contributor
  • *
  • Posts: 147
  • Country: gb
Re: Injoinic IP5328 I2C register map
« Reply #1 on: July 09, 2020, 07:22:46 am »
I too would be interested in this.  I looked a while back, but wasn't able to find anything.
 

Offline RossJTopic starter

  • Newbie
  • Posts: 8
  • Country: au
Re: Injoinic IP5328 I2C register map
« Reply #2 on: July 09, 2020, 08:36:20 am »
Hi aix,

I've been hunting around and made some inquiries with a couple of companies (including Injoinic). If I find anything I'll certainly post it here.

The only evidence I've found that such a document might actually exist is this post... https://www.eevblog.com/forum/projects/diy-cheap-powerbank/50/. Towards the end of the post are some links to register lists for other models. Unfortunately they appear to be quite different and simpler chips (possibly charging only, no fuel gauging). So no use to me.

I've been examining the data too. Much of the 256 byte memory map seems to be in use. However, most areas remain static and is likely configuration (which I'm not really interested in and don't dare touch). A work in progress.

/Ross
 

Offline TestSubject

  • Newbie
  • Posts: 5
Re: Injoinic IP5328 I2C register map
« Reply #3 on: August 25, 2020, 06:47:25 pm »
Has anyone found anymore about this? I am interested.
 

Offline RossJTopic starter

  • Newbie
  • Posts: 8
  • Country: au
Re: Injoinic IP5328 I2C register map
« Reply #4 on: August 26, 2020, 12:38:03 am »
After a followup enquiry with Injoinic, I did receive the register map. It's for the IP5328P which is very similar to the IP5328.
I've attached what I have, including an english translation of the register document.
/Ross
 
The following users thanked this post: cdev, brainwash, aix, Alex Wolf

Offline Vtech

  • Regular Contributor
  • *
  • Posts: 58
  • Country: pl
Re: Injoinic IP5328 I2C register map
« Reply #5 on: January 03, 2022, 02:44:56 pm »
Hi,
I'm resurrecting this old thread.
Thank you RossJ for the register map. Have you been able to communicate with the chip?
I'm also playing with IP5328(P).
The first problem - there is IP5328 and IP5328P. P version supports Power Delivery on USB-C. The datasheet mentions even PPS but my chip only advertises basic 3 profiles - 5V, 9V and 12V. No PPS. Non-P version does not support PD at all. I have both chips. Both of them are marked IP5328. There is no P at the end of the first line of markings. I've noticed that the second line of markings in my verified P version is "MS29.1CAP". On the non-P version, it is "M334.1BA". Notice that there is no P at the end of the second line of markings in the non-P version. Is it a reliable way to distinguish those chips - I have no idea? There is no info about the markings in the datasheet.
The second problem - this chip only supports QuickCharge on the output - it is not able to use QC as input (for charging the battery).
 

Offline RossJTopic starter

  • Newbie
  • Posts: 8
  • Country: au
Re: Injoinic IP5328 I2C register map
« Reply #6 on: January 04, 2022, 01:37:55 am »
Hi Vtech,
Yes I was able to communicate via the I2C interface. Reading out the whole memory was easy. Interpreting it was made easier by getting hold of the register map document. I have written to it a little bit, but that was a little more tricky. I was only interested in this chip because we wanted to hack a power bank which was designed with the IP5328. Specifically, I wanted to access the battery level information and charging status. The biggest issue I had was that the battery level mode can only be changed during a second or two following a reboot. There's no way to know if it actually was successful (except to observe the correct battery level being reported). I never changed any other settings.

As for power handling... The chip seems happy to be fed with any voltage, but detects the voltage within 3 narrow bands for 5, 9 and 12. Charging only occurs when in a valid band. We just supply it with 12V and it's happy. I never used it's power output capabilities so can't really help there I'm afraid. I see the register map has been downloaded several hundred times. Hopefully there's someone else out there who can answer you better.

/Ross

 
 

Offline XperEo

  • Newbie
  • Posts: 2
  • Country: ie
Re: Injoinic IP5328 I2C register map
« Reply #7 on: May 04, 2022, 12:02:30 pm »
Hi Ross,

I'm trying something similar to what you've done, but having an issue reading the battery level information.

I've made the changes to the SYS_CTL6 (0x0A) reg according to the datasheet, but the LED_STATUS (0xDB) reg is always reading the default value of '11'

I've checked my timings on a scope and confirmed I'm writing to the reg within 1s.

Is there something I'm missing? How did you connect your i2c interface?

 

Offline RossJTopic starter

  • Newbie
  • Posts: 8
  • Country: au
Re: Injoinic IP5328 I2C register map
« Reply #8 on: May 04, 2022, 12:43:17 pm »
While I certainly succeeded in changing the configuration to show the level with all 4 LEDs (in 0xDB register), I found it trick to reliably detect when it needed to be reconfigured (esp. given the tight timing window involved). I eventually moved on.
In your case, my first question would be did you configure 0x0A in two separate writes? First the enable and THEN the 4 lights.
 

Offline XperEo

  • Newbie
  • Posts: 2
  • Country: ie
Re: Injoinic IP5328 I2C register map
« Reply #9 on: May 09, 2022, 11:10:12 am »
Hi Ross, Yes I'm enabling first then setting no of leds.
 

Offline Bluegizmo83

  • Newbie
  • Posts: 7
  • Country: us
Re: Injoinic IP5328 I2C register map
« Reply #10 on: May 26, 2022, 04:26:19 am »
I don't mean to hijack this thread, but I have a diy battery bank with this IP5328P controller and it shuts off when the battery voltage drops below like 3.8 volts. The battery percentage meter (it's an lcd readout on mine) will instantly drop from like 60% to 0% and won't output again until I connect a charger for a bit. Im thinking maybe it was programmed incorrectly or something, but looking through the register map provided here, it doesn't look like a cutoff voltage as high as 3.8v is even possible... Has anyone experienced an issue like this? It's not a voltage sag issue either, as I've checked with a volt meter while discharging and the batteries are not sagging way down under load (just typical 0.1V or so sag).
 

Offline gidrontium

  • Newbie
  • Posts: 1
  • Country: pl
Re: Injoinic IP5328 I2C register map
« Reply #11 on: November 23, 2023, 05:22:04 pm »
I would like to continue the topic. I successfully change setting in my IP5306 via I2C, but after reboot of the IC - settings reseted. Do you know how to save settings after reboot of the IC?
 

Offline RossJTopic starter

  • Newbie
  • Posts: 8
  • Country: au
Re: Injoinic IP5328 I2C register map
« Reply #12 on: November 23, 2023, 11:40:54 pm »
If you are hoping to save register values in persistent memory such as flash or EEPROM, then you are out of luck as the chip has none. If you look at the register definitions you will see a reset value listed for each register. This is how the register is set following a reset or power cycle.
I've seen several chips (from other manufacturers) in this application area which seem to rely on the fact that they are permanently attached to a power source (i.e. the battery cells), so don't include flash memory and the like. Persistent memory just adds to the cost of the chip. I would imagine if you are using the I2C interface, you have a controller of some sort which can keep the charger configured correctly. This is likely the intended use.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf