AXP209

From linux-sunxi.org
Jump to navigation Jump to search

The AXP209 is the PMU (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner.

Tips and tricks

  • shorting pin25 to gnd will reset the power/board
  • if the axp is configured the right way pressing the power button long should turn board off (that would also result in a rest when powered on again)
  • you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to reg 36

GPIO

The AXP209 has 4 GPIOs which can be addressed from fex files as port:powerN (N in [0..3]).

Spec Sheets

File:AXP209 Datasheet v1.0 cn.pdf

File:AXP209 Datasheet v1.0en.pdf

File:AXP202 Datasheet v1.0 en.pdf

The correct address for AXP209 on A20 is 0x34

Overview

AXP209 is designed to be a highly-integrated power system management IC that is optimized for applications requiring single-cell Li-battery (Li-Ion/Polymer) and multiple output DC-DC converters.

AXP209 integrates

  • an adaptive USB-Compatible PWM charger
  • 2-way step-down converter (Buck DC-DC converter)
  • 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC
  • 4 configurable GPIO. Sustaining Card power system security the stable
  • AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.

Package

AXP209 6mm x 6mm 48-pin QFN package.

AXP209 Pins

Features

  • Automatic gapless power source change (IPS - Intelligent Power Select)
    • Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)
    • Configurable high efficient IPS system
    • Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)
    • Battery Power Path resistance less than 75mΩ
  • Fully integrated PWM Charger
    • Maximum charging current of up to 1.8A
    • Full support USB charging
    • Battary voltage range: 4.1V/4.15V/4.2V/4.36V
    • Battery temperature monitoring
    • Automatic charging process control
    • Support charger LED
    • Automatically adjust charge current according to system load
  • Backup battery
    • Support backup battery (can be used for RTC module)
    • Support for backup battery, charging current can be set
  • 2 synchronous buck DC-DC converters
    • DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC
    • DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A
  • 5 low drop-out linear regulators
    • LDO1: Always-on 30mA
    • LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA
    • LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA
    • LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA
    • LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA
  • Timer (Timer)
    • 7bit Timer, Timing Range 1127 minutes
    • Timer outputs interrupts
  • Signal acquisition system
    • Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input
    • Built-in Fuelgauge system
    • Provides information, such as power consumption (mA or mW), the remaining battery capacity (% or mAh), the state of charge (%) and the remaining time for battery to charge
    • Two-level low-power warning and protection
    • Internal temperature sensor
  • Application Processor Interface (Host Interface)
    • TWSI (I2C) interface for data exchange
    • IRQs and Sleep Managment
    • Built-in GPIO
    • Built-in configurable timer
    • Provide 12 registers for data storage during system power-off
  • System Management
    • Soft reset and hard reset support
    • Soft and hard power shutdown support
    • Support for external wake source
    • Support the output voltage monitoring, self-diagnostic function
    • Output PWROK, indicating system reset or shutdown instructions
    • External power detection (insert / remove / drive capacity)
    • Supports soft power-on for input & output
    • Over/Under-voltage protection (OVP / UVP)
    • Overcurrent protection (OCP)
    • Overtemperature protection (OTP)
    • Support OTG VBUS power state setting / monitoring
  • Highly integrated
    • Internal precision reference voltage (0.5%)
    • Built-in MOSFET
    • timing and the output voltage can be customized
  • Decryption module
    • 128bit OTP password storage
    • dynamic real-time decryption algorithm

Pin Description

Num Name Type Condition Function Description
1 SDA IO Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power
2 SCK I Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power
3 GPIO3 IO REG9EH[7] GPIO 3
4 N_OE I Power output on/off switch

GND: on

IPSOUT: off

5 GPIO2 IO REG92H[2:0] GPIO 2
6 N_VBUSEN I VBUS to IPSOUT Selection

GND:IPSOUT select VBUS

High:IPSOUT do not select VBUS

7 VIN2 PI DCDC2 input source
8 LX2 IO Inductor Pin for DCDC2
9 PGND2 G NMOS Ground for DCDC2
10 DCDC2 I DC-DC2 feedback pin
11 LDO4 O Output Pin of LDO4
12 LDO2 O Output Pin of LDO2
13 LDO24IN PI Input to LDO2 and LDO4
14 VIN3 PI DCDC3 input source
15 LX3 IO Inductor Pin for DCDC3
16 PGND3 G NMOS GND for DCDC3
17 DCDC3 I Feed back to DCDC3
18 GPIO1 IO REG93H[2:0] GPIO 1

ADC Input

19 GPIO0 IO REG90H[2:0] GPIO 0

Low noise LDO/Switch

ADC Input

20 EXTEN O External Power Enable
21 APS PI Internal Power Input
22 AGND G Analog Ground
23 BIAS IO External 200Kohm 1% resistor
24 VREF O Internal reference voltage
25 PWROK O Power Good Indication Output
26 VINT PO Internal logic power, 2.5V
27 LDO1SET I It set the LDO1 default voltage.
28 LDO1 O LDO1 output,for Host RTC block
29 DC3SET I It set the DCDC3 default voltage
30 BACKUP IO Backup battery pin
31 VBUS PI USB VBUS input
32, 33 ACIN PI Adapter input
34, 35 IPSOUT IO Main Battery
36 CHGLED O charger status indication
37 TS I Battery Temperature sensor input or an external ADC input
38, 39 BAT PO System power source
40 LDO3IN O LDO3 input source
41 LDO3 I Output Pin of LDO3
42 BATSENSE I Current sense port1
43 CHSENSE O Current sense port2
44 VIN1 PI DCDC1 input source
45 LX1 IO Inductor Pin for DCDC1
46 PGND1 G NMOS Ground for DCDC1
47 PWRON I Power On-Off key input,Internal 100k pull high to APS
48 IRQ/WAKEUP IO IRQ output or wakeup
49 EP G Exposed Pad, need to connect to system ground

Battery activation mode

Battery activation mode may indicate that the battery is faulty. This mode is entered either from pre-charge mode or constant current mode under certain conditions. In battery activate mode, the charger always inputs relatively low current to batteries. AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH. AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.

Registers Description

REG 00H: Power input status

Bit Description R/W
7 Indicates ACIN presence

0: ACIN does not exist; 1: ACIN present

R
6 Instructions the ACIN whether available R
5 VBUS is present indication

0: VBUS does not exist; 1: VBUS exist

R
4 Indicate the VBUS whether available R
3 The directions VBUS access before use is greater than VHOLD R
2 Indicates that the battery current direction

0: battery discharge; 1: The battery is charged

R
1 Indicate whether ACIN and VBUS input is shorted on the PCB R
0 The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS R

REG 01H: Power operating mode and charge status indication

Bit Description R/W
7 Indicating AXP209 whether over-temperature

0: not too warm; 1: overtemperature

R
6 Charging indicator

0: not charging or charging has been completed; 1: Charging

R
5 The battery state of existence indicates

0: no battery connected to AXP209; 1: the battery has been connected to the AXP209

R
4 Reservations, can not be changed R
3 Indicates whether the battery into the active mode

0: not to enter the the battery activation patterns; 1: has entered the battery activation mode

R
2 Indicate the charging current is less than the desired current

0: The actual charge current is equal to the desired current; 1: the actual charge current is less than the desired current

R
1-0 Reservations, can not be changed R

REG 02H: USB OTG VBUS status indication

Bit Description R/W
7-3 Reservations, can not be changed
2 Indicate the VBUS whether effective, effective R
1 The directions VBUS Session A / B is effective, and 1 indicates that a valid R
0 Indicative Session End state 1 indicates R

REG 03H: AXP 209 Chip Version

Bit Description R/W
7-4 Unknown, likely unused.
3-0 Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1. R

REG 04-0FH: Data cache

Note: As long as the external power supply, battery or battery backup certain power exists, this data will be kept, not affected by the switch machine.

REG 12H: Power output control

Default value: 5fH
Bit Description R/W Default Value
7 Reserved R 0
6 LDO3 switch control

0: off; 1: open

RW 1
5 Reserved R 0
4 DC-DC2 switch control RW 1
3 LDO4 switch control RW 1
2 LDO2 switch control RW 1
1 DC-DC3 switch control RW 1
0 The EXTEN switch control

0: off; 1: open

RW 1

REG 23H: DC-DC2 output voltage setting

Default value: 16H
Bit Description R/W Default Value
7-6 Reserved
5-0 DC-DC2 output voltage setting

0.7-2.275V, 25mV/step Vout = [0.7 + (Bit5-0) * 0.025] V

RW 0x16 (1.25 V)

REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings

Default value: 00H
Bit Description R/W Default Value
7-4 Reservations, can not be changed
3 LDO3 voltage rate control

1: enable; 0: disable
Note, the 'instant' rate is approx. 0.0167 V/uS.

  • The datasheet is incorrect here.
RW 0
2 DC-DC2 voltage rate control

1: enable; 0: disable

  • The datasheet is incorrect here.
RW 0
1 LDO3 slew rate

0: 25mV/15.625us = 1.6mV/us 1: 25mV/31.250us = 0.8mV/us

RW 0
0 DC-DC2 slew rate

0: 25mV/15.625us = 1.6mV/us 1: 25mV/31.250us = 0.8mV/us

RW 0

REG 27H: DC-DC3 output voltage setting

Default value: XXH
Bit Description R/W Default Value
7 Reservations, can not be changed
6-0 DC-DC3 output voltage setting

0.7-3.5V, 25mV/step Vout = [0.7 + (Bit6-0) * 0.025] V

RW X

REG 28H: LDO2 / 4 output voltage settings

Default value: XXH
Bit Description R/W Default Value
7-4 LDO2 output voltage settings

1.8-3.3V, 100mV/step Vout = [1.8 + (Bit7-4) * 0.1] V

RW X
3-0 LDO4 output voltage settings

1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7 2.8 3.0 3.1 3.2 3.3

RW X

REG 29H: LDO3 output voltage settings

Default value: XXH
Bit Description R/W Default Value
7 LDO3 mode select:

0: LDO mode, the voltage is set by the [6:0] 1: switch-mode voltage is decided by LDO3IN

RW 0
6-0 LDO3 output voltage setting Bit6-Bit0

0.7-2.275V, 25mV/step Vout = [0.7 + (Bit6-0) * 0.025] V

RW X

REG 30H: VBUS-IPSOUT channel management

Default value: 6XH
Bit Description R/W Default Value
7 VBUS available when the VBUS-IPSOUT pathway selection control signal

0: N_VBUSEN ​​pin, to decide whether to open this path 1: VBUS-IPSOUT path select Open, regardless N_VBUSEN ​​state

RW 0
6 VBUS V

HOLD Pressure limiting control 0: not limited pressure; 1: limited pressure

RW 1
5-3 V

HOLD Set up V HOLD = [4.0 + (Bit5-3) * 0.1] V

RW 100
2 Reservations, can not be changed
1-0 VBUS current limit control open time limit stream selection

00:900 mA; 01:500 mA; 10:100 mA; 11: not limit

RW 0

REG 31H: VOFF - Shutdown voltage setting

Default value: X3H of
Bit Description R/W Default Value
7-4 Reservations, can not be changed
3 Sleep mode the PEK or GPIO edge the wakeup enable set:

0: off 1: Open After writing this bit automatically cleared each into Sleep mode again write 1

2-0 VOFF Set up VOFF= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V RW 011

REG 32H: Shutdown settings, battery detection and CHGLED pins control

Default value: 46H
Bit Description R/W Default Value
7 Shutdown control

This bit write output closes AXP209

RW 0
6 Battery monitoring function set bit: 0: off; 1: Open RW 1
5-4 CHGLED pin functions set

00: Hi-Z 01: 25% 1Hz blinking 10: 25% 4Hz blinking 11: output low

RW 00
3 CHGLED pin control set

0: control by charging function 1: REG 32H [5:4] control by the register

RW 0
2 Output Close timing control

0: Close 1: Contrary to start timing

RW 0
1-0 Shutdown delay N_OE AXP209 from low to high

Delay time 00: 128mS; 01: 1S; 10: 2S; 11: 3S

RW 10

REG 33H: Charge control

Default value: CXH
Bit Description R/W Default Value
7 Charging functions enable control bit

0: Off, 1: open

RW 1
6-5 Charging the target voltage set

00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V

RW 10
4 Charging the end of the current set

0: The charging current is less than 10% of the set value, end-of-charge 1: The charging current is less than 15% of the set value, end-of-charge

RW 0
3-0 Charging current is set

Icharge= [300 + (Bit3-0) * 100] mA

RW X

REG 34H: Charge control

Default value: 45H
Bit Description R/W Default Value
7-6 Precharge timeout setting

00: 40 min; 01: 50min; 10: 60min; 11: 70min

RW 1
5 Retention
4 CHGLED mode selection

0: Charging Steady 1: flashes when charging

RW 0
3-2 Reservations, can not be changed
1-0 The constant current mode timeout setting Bit1-0

00: 6Hours; 01: 8Hours; 10: 10Hours; 11: 12Hours

RW 01

REG 35H: Spare battery charging control

Default value: 22H
Bit Description R/W Default Value
7 Backup battery charge enable control

0: off; 1: open

RW 0
6-5 Target backup battery charging voltage set

00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V

RW 01
4-2 Reservations, can not be changed
1-0 Spare battery charging current is set

00: 50uA; 01: 100uA; 10: 200uA; 11: 400uA

RW 10

REG 36H: PEK key parameter settings

Default value: 9DH
Bit Description R/W Default Value
7-6 Boot time settings

00: 128mS; 01: 3S; 10: 1S; 11: 2S.

RW 01
5-4 Long key time set

00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.

RW 01
3 Key long when you grew up in the shutdown automatic shutdown feature set

0: off; 1: open

RW 1
2 The complete power start PWROK signal delay

0:8 mS; 1:64 mS

RW 1
1-0 Length setting shutdown

00: 4S; 01: 6S; 10: 8S; 11: 10S.

RW 01

REG 37H: DC-DC operating frequency is set

Default value: 08H
Bit Description R/W Default Value
7-4 Reservations, can not be changed
3-0 DC-DC switching frequency is set

Each level change of 5%, the default value of 1.5MHz F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz

RW 1000

REG 38H: VLTF-charge Charging the battery temperature threshold set

Default value: A5H of
Bit Description R/W Default Value
7-0 When charging the battery temperature threshold settings, M

M * 10H, when M = A5H corresponding 2.112V; Corresponding voltage 0V3.264V

RW A5H

V LTF-charge = M * 10H * 0.0008V

REG 39H: VHTF-charge Battery charging high temperature threshold settings

Default value: 1FH
Bit Description R/W Default Value
7-0 Charging battery high temperature threshold settings, N

N * 10H, when N = 1FH corresponding 0.397V; can Corresponding voltage 0V3.264V

RW 1FH

VHTF-charge= N * 10H * 0.0008V

REG 3AH: system IPSOUT Vwarning Level1

Default value: 68H
Bit Description R/W Default Value
7-0 System IPSOUT Vwarning Level1 RW 68H

REG 3BH: IPSOUT Vwarning Level2

Default value: 5FH
Bit Description R/W Default Value
7-0 System IPSOUT Vwarning Level2 RW 5FH

The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n): Vwarning = 2.8672 + 1.4mV * n * 4

REG 3CH: VLTF-discharge Battery discharge temperature threshold set

Default value: FCH
Bit Description R/W Default Value
7-0 Discharge the battery temperature threshold settings, M

M * 10H, when M = FCH corresponding 3.226V; Corresponding voltage 0V3.264V

RW FCH

VLTF-discharge= M * 10H * 0.0008V

REG 3DH: VHTF-discharge Battery discharge high temperature threshold settings

Default value: 16H
Bit Description R/W Default Value
7-0 Battery discharge high temperature threshold settings, N

N * 10H, when of N = 16H, corresponding to 0.282V; can The voltage 0V3.264V,

RW 16H

V LTF-discharge = N * 10H * 0.0008V

REG 80H: DC-DC mode selection

Default value: E0H
Bit Description R/W Default Value
7-3 Reservations, can not be changed
2 DC-DC2 operating mode control RW 0
1 DC-DC3 operating mode control

0: PFM / PWM auto-switching 1: fixed PWM

RW 0
0 Reservations, can not be changed

REG 82H: ADC Enable 1

Default value: 83H
Bit Description R/W Default Value
7 Battery voltage ADC enable RW 1
6 Battery current ADC enable RW 0
5 The ACIN Voltage ADC is enabled. RW 0
4 The ACIN current ADC is enabled. RW 0
3 VBUS voltage ADC enable RW 0
2 The VBUS current ADC enable RW 0
1 APS voltage ADC enable RW 1
0 TS pin ADC function is enabled

0: Off, 1: open

RW 1

REG 83H: ADC Enable 2

Default value: 80H
Bit Description R/W Default Value
7 AXP209 internal temperature monitoring ADC enable

0: Off, 1: open

RW 1
6-4 Reservations, can not be changed
3 The GPIO0 ADC enable RW 0
2 The GPIO1 ADC enable RW 0
1-0 Reservations, can not be changed

0: Off, 1: open

REG 84H: ADC sample rate settings, the TS pin control

Default value: 32H
Bit Description R/W Default Value
7-6 ADC sampling rate is set

25 × 2 n Sampling rates of 25, 50, 100, 200Hz

RW 0
5-4 TS pin output current settings:

00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA

RW 11
3 Reservations, can not be changed
2 TS pin function selection

0: battery temperature monitoring function, 1: independent external ADC input path

RW 0
1-0 TS pin current output settings

00: Off 01: On when charging 10: On when ADC enabled 11: Always on

RW 10

REG 85H: ADC input range

Default value: X0H of
Bit Description R/W Default Value
7-2 Reservations, can not be changed
1 The GPIO1 ADC input range RW 0
0 The GPIO0 ADC input range

0:0-2.0475 V 1:0.7-2.7475 V

RW 0

REG 86H: GPIO1 ADC IRQ rising edge threshold set

Default value: FFH
Bit Description R/W Default Value
7-0 One LSB 8mV RW FF

REG 87H: GPIO1 ADC IRQ falling edge threshold set

Default value: 00H
Bit Description R/W Default Value
7-0 One LSB 8mV RW 00

REG 8AH: Timer control

Default value: 00H
Bit Description R/W Default Value
7 Timer expires

Write 1 to clear this status

RW 0
6-0 Set regular time in minutes

To write 0 closed this timer

RW 0000000

REG 8BH: VBUS pin function control monitoring SRP

Default value: 00H
Bit Description R/W Default Value
7-6 Reservations, can not be changed
5-4 VBUS valid voltage settings

00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V

RW 00
3 VBUS Valid detection function settings: 0: Off, 1: Open RW 0
2 VBUS Session detection function settings: 0: Off, 1: Open RW 0
1 Discharge VBUS discharge feature set

0: Close VBUS discharge resistor; 1: VBUS discharge resistor

RW 0
0 Charge VBUS charge feature set

0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge

RW 0

REG 8FH: over-temperature shutdown feature set

Default value: 21H
Bit Description R/W Default Value
7-3 Reservations, can not be changed RW 0
2 AXP209 internal over-temperature shutdown feature set

0: Shutdown; 1: Shutdown

RW 0
1-0 Reservations, can not be changed

GPIO controls

REG 90H: GPIO0 feature set

Default value: 07H
Bit Description Value R/W Default Value
7 GPIO0 rising edge interrupt or wakeup

0: disable 1: enable

RW 0
6 GPIO0 falling edge interrupt or wakeup RW 0
5-3 Reserved, can not be changed
2-0 GPIO0 pin function
000: low output
001: output (3.3V)
010: universal input function
011: low noise LDO5
100: ADC input
1XX: floating
RW 111

REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set

Default value: A5H of
Bit Description Value R/W Default Value
7-4 LDO5 output voltage settings
Vout = [1.8 + (Bit7-4) * 0.1] V
default = 1.8 +10 * 0.1 = 2.8V
RW 1010
3 Reserved, can not be changed
2-0 EXTEN, and GPIO [1:0] set the output high
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V
RW 101

REG 92H: GPIO1 feature set

Default value: 07H
Bit Description Values R/W Default Value
7 GPIO1 rising edge interrupt or wakeup
0: disable
1: enable
RW 0
6 GPIO1 falling edge interrupt or wakeup RW 0
5-3 Reserved, can not be changed
2-0 GPIO1 pin function
000: GPIO output low
001: GPIO output high (3.3V)
010: GPIO input
011: low-noise LDO
100: ADC input
1XX: floating
RW 111

REG 93H: GPIO2 feature set

Default value: 07H
Bit Description Values R/W Default Value
7 GPIO2 rising edge interrupt or wakeup
0: disable
1: enable
RW 0
6 GPIO2 falling edge interrupt or wakeup RW 0
5-3 Reserved, can not be changed
2-0 GPIO2 pin function
000: GPIO output low (open drain)
001: floating
010: GPIO input
XXX: floating
RW 111

REG 94H: GPIO [2:0] signal state setting and monitoring

Default value: 00H
Bit Description Values R/W Default Value
7 Reserved, can not be changed
6 GPIO2 input state
0: input low
1: input high
R
5 GPIO1 input state R
4 GPIO0 input state R
3-0 Reserved, can not be changed

REG 95H: GPIO3 set

Default value: 00H
Bit Description Values R/W Default Value
7 GPIO3 rising edge interrupt or wakeup
0: disable
1: enable
RW 0
6 GPIO3 falling edge interrupt or wakeup RW 0
5-3 Reserved, can not be changed
2 GPIO3 pin function
0: NMOS Open Drain Output
1: digital input function
RW 0
1 GPIO3 output settings
0: output low, NMOS on
1: floating, NMOS off
RW 1
0 GPIO3 input state
0: input high
1: input low
R

Interrupts

The AXP interrupt system has 2 bits for every interrupt, offset by 8 bytes. The first bit is to enable or disable (mask) an interrupt, the second bit, 8 bytes later, is to indicate the interrupt state, e.g. has the interrupt fired. Additionally, the interrupt status bit is also used to clear the interrupt, so that it can fire again.

For example, register 0x40 bit 7, ACIN Over-voltage, can be enabled or disabled by writing a 1 into bit 7 of reg 0x40. When an interrupt is fired and the interrupt line is pulled low, bit 7 of 0x48 will be set to 1. To clear this interrupt, write a 1 into bit 7 of 0x48.

REG 40H and 48H: Interrupt bank 1; Input power

IRQ enable 1 (0x40) default value: 0xd8
IRQ status 1 (0x48) default value: 0x00
Bit Description R/W Default Value
7 AC IN Over-voltage RW 1
6 AC IN connected RW 1
5 AC In disconnected RW 0
4 VBUS over-voltage RW 1
3 VBUS connected RW 1
2 VBUS disconnected RW 1
1 VBUS available, but less than VHOLD RW 1
0 Reserved R 0

REG 41H and 49H: Interrupt bank 2; Battery

IRQ enable 2 (0x41) default value: 0xff
IRQ status 2 (0x49) default value: 0x00
Bit Description R/W Default Value
7 Battery connected RW 1
6 Battery disconnected RW 1
5 Battery charging in activation mode RW 1
4 Battery is no longer charging in activation mode RW 1
3 Battery charging RW 1
2 Battery charging has finished RW 1
1 Battery temperature too high RW 1
0 Battery temperature too low RW 1

REG 42H and 4AH: Interrupt bank 3

IRQ enable 2 (0x42) default value: 0x03
IRQ status 2 (0x4a) default value: 0x00
Bit Description R/W Default Value
7 AXP209 internal temperature sensor temperature too high RW 0
6 Charging current is less than the set current RW 0
5 Reserved R 0
4 DC-DC2 output voltage is less than the set value RW 0
3 DC-DC3 output voltage is less than the set value RW 0
2 LDO3 output voltage is less than the set value RW 0
1 PEK short key press RW 1
0 PEK long keys press RW 1

REG 43H and 4BH: Interrupt bank 4

IRQ enable 4 (0x43) default value: 0x01
IRQ status 4 (0x4b) default value: 0x00
Bit Description R/W Default Value
7 Started via N_OE RW 0
6 Shutdown via N_OE RW 0
5 VBUS power is valid RW 0
4 VBUS power is invalid RW 0
3 VBUS session A / B RW 0
2 VBUS session end RW 0
1 The APS low voltage (LEVEL1) RW 0
0 The APS low voltage (LEVEL2) RW 1

REG 44H and 4CH: Interrupt bank 5

IRQ enable 5 (0x44) default value: 0x00
IRQ status 5 (0x4c) default value: 0x00
Bit Description R/W Default Value
7 Timer timeout RW 0
6 PEK button on the rising edge RW 0
5 PEK button on the falling edge RW 0
4 Reserved R 0
3 GPIO3 input edge-triggered RW 0
2 GPIO2 input edge-triggered RW 0
1 GPIO1 input edge-triggered or ADC input RW 0
0 GPIO0 input edge-triggered RW 0

ADC Measurement Values

First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).

Channel Registers 000h Step FFFh
ACIN Voltage 56h, 57h 0 mV 1.7 mV 6.9615 V
ACIN Current 58h, 59h 0 mA 0.625 mA 2.5594 A
VBUS voltage 5Ah, 5Bh 0 mV 1.7 mV 6.9615 V
VBUS Current 5Ch, 5Dh 0 mA 0.375 mA 1.5356 A
Internal Temperature 5Eh, 5Fh -144.7 C 0.1 C 264.8 C
Temperature Sensor Voltage 62h, 63h 0 mV 0.8 mV 3.276 V
APS (IPSOUT) Voltage 7Eh, 7Fh 0 mV 1.4 mV 5.733 V
Battery Voltage 78h, 79h 0 mV 1.1 mV 4.5045 V
Battery Discharge Current 7Ah, 7Bh 0 mA 0.5 mA 4.095 A
Battery Charge Current 7Ch, 7Dh 0 mA 0.5 mA 4.095 A

REG B8H: Coulomb Counter Control

Default value: 00H
Bit Description R/W Default Value
7 The coulomb meter switch control RW 0
6 Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from RW 0
5 The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from RW 0
4-2 Reservations, can not be changed RW 0
1-0 The decryption start bit, decryption start automatically cleared RW 0
0 Decryption is complete

0: not completed 1: Complete

RW 0

REG B9H: power measurement results

Default value: 7FH
Bit Description R/W Default Value
7 Metering system control

0: normal operating mode 1: suspend work

RW 0
6-0 Measurement results, the percentage of R 7F

Spec Sheets

Internal links

External links