Skip to main content

Register Map

All register addresses are defined in Inc/npz_registers.h. For a complete description of the nPZero registers, please refer to the datasheet available at the documentation page

System Registers

AddressMacroNameAccessDescription
0x00REG_IDLE_RSTIdle/ResetR/WWrite 0xFF = idle, 0xA5 = soft reset.
0x01REG_IDChip IDRDevice identification byte.
0x02REG_STA1Status 1RReset source, ADC triggers, global timeout flag.
0x03REG_STA2Status 2RPeripheral triggered or peripheral NAK flags.
0x04REG_PSWCTLPower Switch ControlR/WHost and peripheral switch modes.
0x05REG_SYSCFG1System Config 1R/WWake-up source enables and any/all logic.
0x06REG_SYSCFG2System Config 2R/WClock source, divider, ADC clock and ext ADC enable.
0x07REG_SYSCFG3System Config 3R/WI/O strength, I2C pull-ups, SPI auto, CLK_OUT.
0x08REG_TOUT_LGlobal Timeout LowR/WLower 8 bits of 16-bit timeout.
0x09REG_TOUT_HGlobal Timeout HighR/WUpper 8 bits of 16-bit timeout.
0x0AREG_INTCFGInterrupt Pin ConfigR/WINT1-INT4 pull-up enable and strength.

Peripheral 1 Registers

AddressMacroNameDescription
0x10REG_CFGP1Config P1Power mode, polling mode, switch mode, INT mode.
0x11REG_MODP1Mode P1Comparison mode, data type, multi-byte, endian, SPI mode, NAK wake.
0x12REG_PERP1_LPolling Period P1 LowLower 8 bits of 16-bit polling period.
0x13REG_PERP1_HPolling Period P1 HighUpper 8 bits of 16-bit polling period.
0x14REG_NCMDP1Num Commands P17-bit init command count (I2C) or byte count (SPI).
0x15REG_ADDRP1Address P1I2C: 7-bit sensor address + SPI enable flag.
0x16REG_RREGP1Read Register P1I2C sensor register holding measurement data.
0x17REG_THROVP1_LOver Threshold P1 LowLower byte of 16-bit over threshold.
0x18REG_THROVP1_HOver Threshold P1 HighUpper byte of 16-bit over threshold.
0x19REG_THRUNP1_LUnder Threshold P1 LowLower byte of 16-bit under threshold.
0x1AREG_THRUNP1_HUnder Threshold P1 HighUpper byte of 16-bit under threshold.
0x1BREG_TWTP1Time to Wait P1Pre/post-init wait duration in TWTP units.
0x1CREG_TCFGP1Time to Wait Config P1Wait enable/extend bits and NAK retry count.

Peripheral 2 Registers

AddressMacroNameDescription
0x1DREG_CFGP2Config P2Same fields as P1.
0x1EREG_MODP2Mode P2
0x1FREG_PERP2_LPolling Period P2 Low
0x20REG_PERP2_HPolling Period P2 High
0x21REG_NCMDP2Num Commands P2
0x22REG_ADDRP2Address P2
0x23REG_RREGP2Read Register P2
0x24REG_THROVP2_LOver Threshold P2 Low
0x25REG_THROVP2_HOver Threshold P2 High
0x26REG_THRUNP2_LUnder Threshold P2 Low
0x27REG_THRUNP2_HUnder Threshold P2 High
0x28REG_TWTP2Time to Wait P2
0x29REG_TCFGP2Time to Wait Config P2

Peripheral 3 Registers

AddressMacroNameDescription
0x2AREG_CFGP3Config P3Same fields as P1.
0x2BREG_MODP3Mode P3
0x2CREG_PERP3_LPolling Period P3 Low
0x2DREG_PERP3_HPolling Period P3 High
0x2EREG_NCMDP3Num Commands P3
0x2FREG_ADDRP3Address P3
0x30REG_RREGP3Read Register P3
0x31REG_THROVP3_LOver Threshold P3 Low
0x32REG_THROVP3_HOver Threshold P3 High
0x33REG_THRUNP3_LUnder Threshold P3 Low
0x34REG_THRUNP3_HUnder Threshold P3 High
0x35REG_TWTP3Time to Wait P3
0x36REG_TCFGP3Time to Wait Config P3

Peripheral 4 Registers

AddressMacroNameDescription
0x37REG_CFGP4Config P4Same fields as P1.
0x38REG_MODP4Mode P4
0x39REG_PERP4_LPolling Period P4 Low
0x3AREG_PERP4_HPolling Period P4 High
0x3BREG_NCMDP4Num Commands P4
0x3CREG_ADDRP4Address P4
0x3DREG_RREGP4Read Register P4
0x3EREG_THROVP4_LOver Threshold P4 Low
0x3FREG_THROVP4_HOver Threshold P4 High
0x40REG_THRUNP4_LUnder Threshold P4 Low
0x41REG_THRUNP4_HUnder Threshold P4 High
0x42REG_TWTP4Time to Wait P4
0x43REG_TCFGP4Time to Wait Config P4

ADC Threshold Registers

AddressMacroNameDescription
0x44REG_THROVA1Over Threshold Internal ADC5-bit VBAT over threshold code.
0x45REG_THRUNA1Under Threshold Internal ADC5-bit VBAT under threshold code.
0x46REG_THROVA2Over Threshold External ADC6-bit ADC_IN over threshold code.
0x47REG_THRUNA2Under Threshold External ADC6-bit ADC_IN under threshold code.

Value Registers (Read-only)

AddressMacroNameDescription
0x50REG_VALP1_LValue P1 LowLast measurement low byte (P1).
0x51REG_VALP1_HValue P1 HighLast measurement high byte (P1).
0x52REG_VALP2_LValue P2 Low
0x53REG_VALP2_HValue P2 High
0x54REG_VALP3_LValue P3 Low
0x55REG_VALP3_HValue P3 High
0x56REG_VALP4_LValue P4 Low
0x57REG_VALP4_HValue P4 High
0x58REG_ADC_COREInternal ADC ValueLast VBAT 5-bit code.
0x59REG_ADC_EXTExternal ADC ValueLast ADC_IN 6-bit code.

SRAM

AddressMacroDescription
0x80REG_SRAM_STARTFirst SRAM byte. Used to store peripheral init sequences.
0xFFREG_SRAM_ENDLast SRAM byte.
SRAM_REG_SIZE (0x80)128 bytes SRAM available.

Total SRAM size: 128 bytes (0x80-0xFF). The driver allocates SRAM sequentially across all configured peripherals at configuration time.