Registers

Summary

NameOffsetLengthDescription
adc_ctrl.INTR_STATE0x04Interrupt State Register
adc_ctrl.INTR_ENABLE0x44Interrupt Enable Register
adc_ctrl.INTR_TEST0x84Interrupt Test Register
adc_ctrl.ALERT_TEST0xc4Alert Test Register
adc_ctrl.adc_en_ctl0x104ADC enable control register
adc_ctrl.adc_pd_ctl0x144ADC PowerDown(PD) control register
adc_ctrl.adc_lp_sample_ctl0x184ADC Low-Power(LP) sample control register
adc_ctrl.adc_sample_ctl0x1c4ADC sample control register
adc_ctrl.adc_fsm_rst0x204ADC FSM reset control
adc_ctrl.adc_chn0_filter_ctl_00x244ADC channel0 filter range
adc_ctrl.adc_chn0_filter_ctl_10x284ADC channel0 filter range
adc_ctrl.adc_chn0_filter_ctl_20x2c4ADC channel0 filter range
adc_ctrl.adc_chn0_filter_ctl_30x304ADC channel0 filter range
adc_ctrl.adc_chn0_filter_ctl_40x344ADC channel0 filter range
adc_ctrl.adc_chn0_filter_ctl_50x384ADC channel0 filter range
adc_ctrl.adc_chn0_filter_ctl_60x3c4ADC channel0 filter range
adc_ctrl.adc_chn0_filter_ctl_70x404ADC channel0 filter range
adc_ctrl.adc_chn1_filter_ctl_00x444ADC channel1 filter range
adc_ctrl.adc_chn1_filter_ctl_10x484ADC channel1 filter range
adc_ctrl.adc_chn1_filter_ctl_20x4c4ADC channel1 filter range
adc_ctrl.adc_chn1_filter_ctl_30x504ADC channel1 filter range
adc_ctrl.adc_chn1_filter_ctl_40x544ADC channel1 filter range
adc_ctrl.adc_chn1_filter_ctl_50x584ADC channel1 filter range
adc_ctrl.adc_chn1_filter_ctl_60x5c4ADC channel1 filter range
adc_ctrl.adc_chn1_filter_ctl_70x604ADC channel1 filter range
adc_ctrl.adc_chn_val_00x644ADC value sampled on channel
adc_ctrl.adc_chn_val_10x684ADC value sampled on channel
adc_ctrl.adc_wakeup_ctl0x6c4Enable filter matches as wakeups
adc_ctrl.filter_status0x704Adc filter match status
adc_ctrl.adc_intr_ctl0x744Interrupt enable controls.
adc_ctrl.adc_intr_status0x784Debug cable internal status
adc_ctrl.adc_fsm_state0x7c4State of the internal state machine

INTR_STATE

Interrupt State Register

  • Offset: 0x0
  • Reset default: 0x0
  • Reset mask: 0x1

Fields

{"reg": [{"name": "match_pending", "bits": 1, "attr": ["ro"], "rotate": -90}, {"bits": 31}], "config": {"lanes": 1, "fontsize": 10, "vspace": 150}}
BitsTypeResetNameDescription
31:1Reserved
0ro0x0match_pendingADC match or measurement event has occurred

INTR_ENABLE

Interrupt Enable Register

  • Offset: 0x4
  • Reset default: 0x0
  • Reset mask: 0x1

Fields

{"reg": [{"name": "match_pending", "bits": 1, "attr": ["rw"], "rotate": -90}, {"bits": 31}], "config": {"lanes": 1, "fontsize": 10, "vspace": 150}}
BitsTypeResetNameDescription
31:1Reserved
0rw0x0match_pendingEnable interrupt when INTR_STATE.match_pending is set.

INTR_TEST

Interrupt Test Register

  • Offset: 0x8
  • Reset default: 0x0
  • Reset mask: 0x1

Fields

{"reg": [{"name": "match_pending", "bits": 1, "attr": ["wo"], "rotate": -90}, {"bits": 31}], "config": {"lanes": 1, "fontsize": 10, "vspace": 150}}
BitsTypeResetNameDescription
31:1Reserved
0wo0x0match_pendingWrite 1 to force INTR_STATE.match_pending to 1.

ALERT_TEST

Alert Test Register

  • Offset: 0xc
  • Reset default: 0x0
  • Reset mask: 0x1

Fields

{"reg": [{"name": "fatal_fault", "bits": 1, "attr": ["wo"], "rotate": -90}, {"bits": 31}], "config": {"lanes": 1, "fontsize": 10, "vspace": 130}}
BitsTypeResetNameDescription
31:1Reserved
0wo0x0fatal_faultWrite 1 to trigger one alert event of this kind.

adc_en_ctl

ADC enable control register

  • Offset: 0x10
  • Reset default: 0x0
  • Reset mask: 0x3

Fields

{"reg": [{"name": "adc_enable", "bits": 1, "attr": ["rw"], "rotate": -90}, {"name": "oneshot_mode", "bits": 1, "attr": ["rw"], "rotate": -90}, {"bits": 30}], "config": {"lanes": 1, "fontsize": 10, "vspace": 140}}
BitsTypeResetNameDescription
31:2Reserved
1rw0x0oneshot_modeOneshot mode does not care about the filter value. 1’b0: disable; 1’b1: enable
0rw0x0adc_enable1’b0: to power down ADC and ADC_CTRL FSM will enter the reset state; 1’b1: to power up ADC and ADC_CTRL FSM will start

adc_pd_ctl

ADC PowerDown(PD) control register

  • Offset: 0x14
  • Reset default: 0x64070
  • Reset mask: 0xfffffff1

Fields

{"reg": [{"name": "lp_mode", "bits": 1, "attr": ["rw"], "rotate": -90}, {"bits": 3}, {"name": "pwrup_time", "bits": 4, "attr": ["rw"], "rotate": -90}, {"name": "wakeup_time", "bits": 24, "attr": ["rw"], "rotate": 0}], "config": {"lanes": 1, "fontsize": 10, "vspace": 120}}
BitsTypeResetNameDescription
31:8rw0x640wakeup_timeHow often FSM wakes up from ADC PD mode to take a sample, measured in always on clock cycles.
7:4rw0x7pwrup_timeADC power up time, measured in always on clock cycles. After power up time is reached, the ADC controller needs one additional cycle before an ADC channel is selected for access.
3:1Reserved
0rw0x0lp_mode1’b0: adc_pd is disabled, use adc_sample_ctl. 1’b1: adc_pd is enabled, use both adc_lp_sample_ctl & adc_sample_ctl

adc_lp_sample_ctl

ADC Low-Power(LP) sample control register

  • Offset: 0x18
  • Reset default: 0x4
  • Reset mask: 0xff

Fields

{"reg": [{"name": "lp_sample_cnt", "bits": 8, "attr": ["rw"], "rotate": 0}, {"bits": 24}], "config": {"lanes": 1, "fontsize": 10, "vspace": 80}}
BitsTypeResetNameDescription
31:8Reserved
7:0rw0x4lp_sample_cntThe number of samples in low-power mode when the low-power mode is enabled. After the programmed number is met, ADC won’t be powered down any more. This value must be 1 or larger.

adc_sample_ctl

ADC sample control register

  • Offset: 0x1c
  • Reset default: 0x9b
  • Reset mask: 0xffff

Fields

{"reg": [{"name": "np_sample_cnt", "bits": 16, "attr": ["rw"], "rotate": 0}, {"bits": 16}], "config": {"lanes": 1, "fontsize": 10, "vspace": 80}}
BitsTypeResetNameDescription
31:16Reserved
15:0rw0x9bnp_sample_cntThe number of samples in normal-power mode to meet the debounce spec. Used after the low-power mode condition is met or in the normal power mode. This value must be 1 or larger.

adc_fsm_rst

ADC FSM reset control

  • Offset: 0x20
  • Reset default: 0x0
  • Reset mask: 0x1

Fields

{"reg": [{"name": "rst_en", "bits": 1, "attr": ["rw"], "rotate": -90}, {"bits": 31}], "config": {"lanes": 1, "fontsize": 10, "vspace": 80}}
BitsTypeResetNameDescription
31:1Reserved
0rw0x0rst_en1’b0: Normal functional mode. 1’b1: SW to reset all the FSMs and timers

adc_chn0_filter_ctl

ADC channel0 filter range

Up to 8 filters can be configured per channel and each filter has an associated [min, max] range. The condition bit then defines whether the sample values of that channel need to lie within the range or outside to create a match. The filter range bounds can be configured with a granularity of 2.148mV.

  • Reset default: 0x0
  • Reset mask: 0x8ffc1ffc

Instances

NameOffset
adc_chn0_filter_ctl_00x24
adc_chn0_filter_ctl_10x28
adc_chn0_filter_ctl_20x2c
adc_chn0_filter_ctl_30x30
adc_chn0_filter_ctl_40x34
adc_chn0_filter_ctl_50x38
adc_chn0_filter_ctl_60x3c
adc_chn0_filter_ctl_70x40

Fields

{"reg": [{"bits": 2}, {"name": "min_v", "bits": 10, "attr": ["rw"], "rotate": 0}, {"name": "cond", "bits": 1, "attr": ["rw"], "rotate": -90}, {"bits": 5}, {"name": "max_v", "bits": 10, "attr": ["rw"], "rotate": 0}, {"bits": 3}, {"name": "EN", "bits": 1, "attr": ["rw"], "rotate": -90}], "config": {"lanes": 1, "fontsize": 10, "vspace": 80}}
BitsTypeResetNameDescription
31rw0x0ENEnable for filter
30:28Reserved
27:18rw0x0max_v10-bit for chn0 filter max value
17:13Reserved
12rw0x0cond1-bit for the condition; 1’b0 means min<=ADC<=max, 1’b1 means ADC>max or ADC<min
11:2rw0x0min_v10-bit for chn0 filter min value
1:0Reserved

adc_chn1_filter_ctl

ADC channel1 filter range

Up to 8 filters can be configured per channel and each filter has an associated [min, max] range. The condition bit then defines whether the sample values of that channel need to lie within the range or outside to create a match. The filter range bounds can be configured with a granularity of 2.148mV.

  • Reset default: 0x0
  • Reset mask: 0x8ffc1ffc

Instances

NameOffset
adc_chn1_filter_ctl_00x44
adc_chn1_filter_ctl_10x48
adc_chn1_filter_ctl_20x4c
adc_chn1_filter_ctl_30x50
adc_chn1_filter_ctl_40x54
adc_chn1_filter_ctl_50x58
adc_chn1_filter_ctl_60x5c
adc_chn1_filter_ctl_70x60

Fields

{"reg": [{"bits": 2}, {"name": "min_v", "bits": 10, "attr": ["rw"], "rotate": 0}, {"name": "cond", "bits": 1, "attr": ["rw"], "rotate": -90}, {"bits": 5}, {"name": "max_v", "bits": 10, "attr": ["rw"], "rotate": 0}, {"bits": 3}, {"name": "EN", "bits": 1, "attr": ["rw"], "rotate": -90}], "config": {"lanes": 1, "fontsize": 10, "vspace": 80}}
BitsTypeResetNameDescription
31rw0x0ENEnable for filter
30:28Reserved
27:18rw0x0max_v10-bit for chn0 filter max value
17:13Reserved
12rw0x0cond1-bit for the condition; 1’b0 means min<=ADC<=max, 1’b1 means ADC>max or ADC<min
11:2rw0x0min_v10-bit for chn0 filter min value
1:0Reserved

adc_chn_val

ADC value sampled on channel

  • Reset default: 0x0
  • Reset mask: 0xfff0fff

Instances

NameOffset
adc_chn_val_00x64
adc_chn_val_10x68

Fields

{"reg": [{"name": "adc_chn_value_ext", "bits": 2, "attr": ["ro"], "rotate": -90}, {"name": "adc_chn_value", "bits": 10, "attr": ["ro"], "rotate": 0}, {"bits": 4}, {"name": "adc_chn_value_intr_ext", "bits": 2, "attr": ["ro"], "rotate": -90}, {"name": "adc_chn_value_intr", "bits": 10, "attr": ["ro"], "rotate": 0}, {"bits": 4}], "config": {"lanes": 1, "fontsize": 10, "vspace": 240}}
BitsTypeResetNameDescription
31:28Reserved
27:18ro0x0adc_chn_value_intrADC value sampled on channel when the interrupt is raised(debug cable is attached or disconnected), each step is 2.148mV
17:16ro0x0adc_chn_value_intr_ext2-bit extension; RO 0
15:12Reserved
11:2ro0x0adc_chn_valueLatest ADC value sampled on channel. each step is 2.148mV
1:0ro0x0adc_chn_value_ext2-bit extension; RO 0

adc_wakeup_ctl

Enable filter matches as wakeups

  • Offset: 0x6c
  • Reset default: 0x0
  • Reset mask: 0x1ff

Fields

{"reg": [{"name": "MATCH_EN", "bits": 8, "attr": ["rw"], "rotate": 0}, {"name": "TRANS_EN", "bits": 1, "attr": ["rw"], "rotate": -90}, {"bits": 23}], "config": {"lanes": 1, "fontsize": 10, "vspace": 100}}
BitsTypeResetName
31:9Reserved
8rw0x0TRANS_EN
7:0rw0x0MATCH_EN

adc_wakeup_ctl . TRANS_EN

Wakeup due to FSM transition from low power sampling mode to normal sampling mode.

Note that this wakeup source is primarily intended for debug purposes. If enabled all the time, this can lead to many wakeups due to false positives that are ruled out automatically by adc_ctrl after transitioning from LP -> NP.

0: transition match will not generate wakeup; 1: transition match will generate wakeup

adc_wakeup_ctl . MATCH_EN

Filter wakeup source.

0: filter match will not generate wakeup; 1: filter match will generate wakeup

filter_status

Adc filter match status

Indicates whether a particular filter has matched on all channels.

  • Offset: 0x70
  • Reset default: 0x0
  • Reset mask: 0x1ff

Fields

{"reg": [{"name": "MATCH", "bits": 8, "attr": ["rw1c"], "rotate": 0}, {"name": "TRANS", "bits": 1, "attr": ["rw1c"], "rotate": -90}, {"bits": 23}], "config": {"lanes": 1, "fontsize": 10, "vspace": 80}}
BitsTypeResetNameDescription
31:9Reserved
8rw1c0x0TRANS0: transition did not occur; 1: transition occurred
7:0rw1c0x0MATCH0: filter condition is not met; 1: filter condition is met

adc_intr_ctl

Interrupt enable controls.

adc_ctrl sends out only 1 interrupt, so this register controls which internal sources are actually registered.

This register uses the same bit enumeration as ADC_INTR_STATUS

  • Offset: 0x74
  • Reset default: 0x0
  • Reset mask: 0x3ff

Fields

{"reg": [{"name": "MATCH_EN", "bits": 8, "attr": ["rw"], "rotate": 0}, {"name": "TRANS_EN", "bits": 1, "attr": ["rw"], "rotate": -90}, {"name": "ONESHOT_EN", "bits": 1, "attr": ["rw"], "rotate": -90}, {"bits": 22}], "config": {"lanes": 1, "fontsize": 10, "vspace": 120}}
BitsTypeResetName
31:10Reserved
9rw0x0ONESHOT_EN
8rw0x0TRANS_EN
7:0rw0x0MATCH_EN

adc_intr_ctl . ONESHOT_EN

Interrupt due to oneshot sampling.

0: interrupt source is not enabled; 1: interrupt source is enabled

adc_intr_ctl . TRANS_EN

Interrupt due to FSM transition from low power sampling mode to normal sampling mode. This is mainly intended for debug.

Note that this interrupt is primarily intended for debug purposes.

0: interrupt source is not enabled; 1: interrupt source is enabled

adc_intr_ctl . MATCH_EN

Filter interrupt source.

0: interrupt source is not enabled; 1: interrupt source is enabled

adc_intr_status

Debug cable internal status

  • Offset: 0x78
  • Reset default: 0x0
  • Reset mask: 0x3ff

Fields

{"reg": [{"name": "MATCH", "bits": 8, "attr": ["rw1c"], "rotate": 0}, {"name": "TRANS", "bits": 1, "attr": ["rw1c"], "rotate": -90}, {"name": "ONESHOT", "bits": 1, "attr": ["rw1c"], "rotate": -90}, {"bits": 22}], "config": {"lanes": 1, "fontsize": 10, "vspace": 90}}
BitsTypeResetNameDescription
31:10Reserved
9rw1c0x0ONESHOT0: oneshot sample is not done ; 1: oneshot sample is done
8rw1c0x0TRANS0: transition did not occur; 1: transition occurred
7:0rw1c0x0MATCH0: filter condition is not met; 1: filter condition is met

adc_fsm_state

State of the internal state machine

  • Offset: 0x7c
  • Reset default: 0x0
  • Reset mask: 0x1f

Fields

{"reg": [{"name": "state", "bits": 5, "attr": ["ro"], "rotate": 0}, {"bits": 27}], "config": {"lanes": 1, "fontsize": 10, "vspace": 80}}
BitsTypeResetName
31:5Reserved
4:0ro0x0state

adc_fsm_state . state

Current FSM state (for debug purposes)

ValueNameDescription
0x00PWRDNin the power down state
0x01PWRUPbeing powered up
0x02ONEST_0in oneshot mode; sample channel0 value
0x03ONEST_021in oneshot mode; transition from chn0 to chn1
0x04ONEST_1in oneshot mode; sample channel1 value
0x05ONEST_DONEone shot done
0x06LP_0in low-power mode, sample channel0 value
0x07LP_021in low-power mode, transition from chn0 to chn1
0x08LP_1in low-power mode, sample channel1 value
0x09LP_EVALin low-power mode, evaluate if there is a match
0x0aLP_SLPin low-power mode, go to sleep
0x0bLP_PWRUPin low-power mode, being powered up
0x0cNP_0in normal-power mode, sample channel0 value
0x0dNP_021in normal-power mode, transition from chn0 to chn1
0x0eNP_1in normal-power mode, sample channel1 value
0x0fNP_EVALin normal-power mode, detection is done
0x10NP_DONEnormal-power detection done

Other values are reserved.