1#[doc = "DCDC"]
2#[repr(C)]
3pub struct RegisterBlock {
4#[doc = "DCDC Register 0"]
5pub REG0: crate::RWRegister<u32>,
6#[doc = "DCDC Register 1"]
7pub REG1: crate::RWRegister<u32>,
8#[doc = "DCDC Register 2"]
9pub REG2: crate::RWRegister<u32>,
10#[doc = "DCDC Register 3"]
11pub REG3: crate::RWRegister<u32>,
12}
13#[doc = "DCDC Register 0"]
14pub mod REG0 {
15#[doc = "power down the zero cross detection function for discontinuous conductor mode"]
16pub mod PWD_ZCD {
17pub const offset: u32 = 0;
18pub const mask: u32 = 0x01 << offset;
19pub mod R {}
20pub mod W {}
21pub mod RW {}
22 }
23#[doc = "Disable automatic clock switch from internal osc to xtal clock."]
24pub mod DISABLE_AUTO_CLK_SWITCH {
25pub const offset: u32 = 1;
26pub const mask: u32 = 0x01 << offset;
27pub mod R {}
28pub mod W {}
29pub mod RW {}
30 }
31#[doc = "select 24 MHz Crystal clock for DCDC, when dcdc_disable_auto_clk_switch is set."]
32pub mod SEL_CLK {
33pub const offset: u32 = 2;
34pub const mask: u32 = 0x01 << offset;
35pub mod R {}
36pub mod W {}
37pub mod RW {}
38 }
39#[doc = "Power down internal osc. Only set this bit, when 24 MHz crystal osc is available"]
40pub mod PWD_OSC_INT {
41pub const offset: u32 = 3;
42pub const mask: u32 = 0x01 << offset;
43pub mod R {}
44pub mod W {}
45pub mod RW {}
46 }
47#[doc = "The power down signal of the current detector."]
48pub mod PWD_CUR_SNS_CMP {
49pub const offset: u32 = 4;
50pub const mask: u32 = 0x01 << offset;
51pub mod R {}
52pub mod W {}
53pub mod RW {}
54 }
55#[doc = "Set the threshold of current detector, if the peak current of the inductor exceeds the threshold, the current detector will assert"]
56pub mod CUR_SNS_THRSH {
57pub const offset: u32 = 5;
58pub const mask: u32 = 0x07 << offset;
59pub mod R {}
60pub mod W {}
61pub mod RW {}
62 }
63#[doc = "power down overcurrent detection comparator"]
64pub mod PWD_OVERCUR_DET {
65pub const offset: u32 = 8;
66pub const mask: u32 = 0x01 << offset;
67pub mod R {}
68pub mod W {}
69pub mod RW {}
70 }
71#[doc = "The threshold of over current detection in run mode and power save mode: run mode power save mode 0x0 1 A 0"]
72pub mod OVERCUR_TRIG_ADJ {
73pub const offset: u32 = 9;
74pub const mask: u32 = 0x03 << offset;
75pub mod R {}
76pub mod W {}
77pub mod RW {}
78 }
79#[doc = "set to \"1\" to power down the low voltage detection comparator"]
80pub mod PWD_CMP_BATT_DET {
81pub const offset: u32 = 11;
82pub const mask: u32 = 0x01 << offset;
83pub mod R {}
84pub mod W {}
85pub mod RW {}
86 }
87#[doc = "adjust value to poslimit_buck register"]
88pub mod ADJ_POSLIMIT_BUCK {
89pub const offset: u32 = 12;
90pub const mask: u32 = 0x0f << offset;
91pub mod R {}
92pub mod W {}
93pub mod RW {}
94 }
95#[doc = "enable the overload detection in power save mode, if current is larger than the overloading threshold (typical value is 50 mA), DCDC will switch to the run mode automatically"]
96pub mod EN_LP_OVERLOAD_SNS {
97pub const offset: u32 = 16;
98pub const mask: u32 = 0x01 << offset;
99pub mod R {}
100pub mod W {}
101pub mod RW {}
102 }
103#[doc = "power down overvoltage detection comparator"]
104pub mod PWD_HIGH_VOLT_DET {
105pub const offset: u32 = 17;
106pub const mask: u32 = 0x01 << offset;
107pub mod R {}
108pub mod W {}
109pub mod RW {}
110 }
111#[doc = "the threshold of the counting number of charging times during the period that lp_overload_freq_sel sets in power save mode"]
112pub mod LP_OVERLOAD_THRSH {
113pub const offset: u32 = 18;
114pub const mask: u32 = 0x03 << offset;
115pub mod R {}
116pub mod W {}
117pub mod RW {}
118 }
119#[doc = "the period of counting the charging times in power save mode 0: eight 32k cycle 1: sixteen 32k cycle"]
120pub mod LP_OVERLOAD_FREQ_SEL {
121pub const offset: u32 = 20;
122pub const mask: u32 = 0x01 << offset;
123pub mod R {}
124pub mod W {}
125pub mod RW {}
126 }
127#[doc = "Adjust hysteretic value in low power from 12.5mV to 25mV"]
128pub mod LP_HIGH_HYS {
129pub const offset: u32 = 21;
130pub const mask: u32 = 0x01 << offset;
131pub mod R {}
132pub mod W {}
133pub mod RW {}
134 }
135#[doc = "power down output range comparator"]
136pub mod PWD_CMP_OFFSET {
137pub const offset: u32 = 26;
138pub const mask: u32 = 0x01 << offset;
139pub mod R {}
140pub mod W {}
141pub mod RW {}
142 }
143#[doc = "1'b1: Disable xtalok detection circuit 1'b0: Enable xtalok detection circuit"]
144pub mod XTALOK_DISABLE {
145pub const offset: u32 = 27;
146pub const mask: u32 = 0x01 << offset;
147pub mod R {}
148pub mod W {}
149pub mod RW {}
150 }
151#[doc = "reset current alert signal"]
152pub mod CURRENT_ALERT_RESET {
153pub const offset: u32 = 28;
154pub const mask: u32 = 0x01 << offset;
155pub mod R {}
156pub mod W {}
157pub mod RW {}
158 }
159#[doc = "set to 1 to switch internal ring osc to xtal 24M"]
160pub mod XTAL_24M_OK {
161pub const offset: u32 = 29;
162pub const mask: u32 = 0x01 << offset;
163pub mod R {}
164pub mod W {}
165pub mod RW {}
166 }
167#[doc = "Status register to indicate DCDC status. 1'b1: DCDC already settled 1'b0: DCDC is settling"]
168pub mod STS_DC_OK {
169pub const offset: u32 = 31;
170pub const mask: u32 = 0x01 << offset;
171pub mod R {}
172pub mod W {}
173pub mod RW {}
174 }
175}
176#[doc = "DCDC Register 1"]
177pub mod REG1 {
178#[doc = "select the feedback point of the internal regulator"]
179pub mod REG_FBK_SEL {
180pub const offset: u32 = 7;
181pub const mask: u32 = 0x03 << offset;
182pub mod R {}
183pub mod W {}
184pub mod RW {}
185 }
186#[doc = "control the load resistor of the internal regulator of DCDC, the load resistor is connected as default \"1\", and need set to \"0\" to disconnect the load resistor"]
187pub mod REG_RLOAD_SW {
188pub const offset: u32 = 9;
189pub const mask: u32 = 0x01 << offset;
190pub mod R {}
191pub mod W {}
192pub mod RW {}
193 }
194#[doc = "set the current bias of low power comparator 0x0: 50 nA 0x1: 100 nA 0x2: 200 nA 0x3: 400 nA"]
195pub mod LP_CMP_ISRC_SEL {
196pub const offset: u32 = 12;
197pub const mask: u32 = 0x03 << offset;
198pub mod R {}
199pub mod W {}
200pub mod RW {}
201 }
202#[doc = "increase the threshold detection for common mode analog comparator"]
203pub mod LOOPCTRL_HST_THRESH {
204pub const offset: u32 = 21;
205pub const mask: u32 = 0x01 << offset;
206pub mod R {}
207pub mod W {}
208pub mod RW {}
209 }
210#[doc = "Enable hysteresis in switching converter common mode analog comparators"]
211pub mod LOOPCTRL_EN_HYST {
212pub const offset: u32 = 23;
213pub const mask: u32 = 0x01 << offset;
214pub mod R {}
215pub mod W {}
216pub mod RW {}
217 }
218#[doc = "trim bandgap voltage"]
219pub mod VBG_TRIM {
220pub const offset: u32 = 24;
221pub const mask: u32 = 0x1f << offset;
222pub mod R {}
223pub mod W {}
224pub mod RW {}
225 }
226}
227#[doc = "DCDC Register 2"]
228pub mod REG2 {
229#[doc = "Ratio of integral control parameter to proportional control parameter in the switching DC-DC converter, and can be used to optimize efficiency and loop response"]
230pub mod LOOPCTRL_DC_C {
231pub const offset: u32 = 0;
232pub const mask: u32 = 0x03 << offset;
233pub mod R {}
234pub mod W {}
235pub mod RW {}
236 }
237#[doc = "Magnitude of proportional control parameter in the switching DC-DC converter control loop."]
238pub mod LOOPCTRL_DC_R {
239pub const offset: u32 = 2;
240pub const mask: u32 = 0x0f << offset;
241pub mod R {}
242pub mod W {}
243pub mod RW {}
244 }
245#[doc = "Two's complement feed forward step in duty cycle in the switching DC-DC converter"]
246pub mod LOOPCTRL_DC_FF {
247pub const offset: u32 = 6;
248pub const mask: u32 = 0x07 << offset;
249pub mod R {}
250pub mod W {}
251pub mod RW {}
252 }
253#[doc = "Enable analog circuit of DC-DC converter to respond faster under transient load conditions."]
254pub mod LOOPCTRL_EN_RCSCALE {
255pub const offset: u32 = 9;
256pub const mask: u32 = 0x07 << offset;
257pub mod R {}
258pub mod W {}
259pub mod RW {}
260 }
261#[doc = "Increase the threshold detection for RC scale circuit."]
262pub mod LOOPCTRL_RCSCALE_THRSH {
263pub const offset: u32 = 12;
264pub const mask: u32 = 0x01 << offset;
265pub mod R {}
266pub mod W {}
267pub mod RW {}
268 }
269#[doc = "Invert the sign of the hysteresis in DC-DC analog comparators."]
270pub mod LOOPCTRL_HYST_SIGN {
271pub const offset: u32 = 13;
272pub const mask: u32 = 0x01 << offset;
273pub mod R {}
274pub mod W {}
275pub mod RW {}
276 }
277#[doc = "This bit enables the DC-DC to improve efficiency and minimize ripple using the information from the BATT_VAL field"]
278pub mod BATTMONITOR_EN_BATADJ {
279pub const offset: u32 = 15;
280pub const mask: u32 = 0x01 << offset;
281pub mod R {}
282pub mod W {}
283pub mod RW {}
284 }
285#[doc = "Set to \"0\" : stop charging if the duty cycle is lower than what set by dcdc_neglimit_in"]
286pub mod DISABLE_PULSE_SKIP {
287pub const offset: u32 = 27;
288pub const mask: u32 = 0x01 << offset;
289pub mod R {}
290pub mod W {}
291pub mod RW {}
292 }
293#[doc = "Set high to improve the transition from heavy load to light load"]
294pub mod DCM_SET_CTRL {
295pub const offset: u32 = 28;
296pub const mask: u32 = 0x01 << offset;
297pub mod R {}
298pub mod W {}
299pub mod RW {}
300 }
301}
302#[doc = "DCDC Register 3"]
303pub mod REG3 {
304#[doc = "Target value of VDD_SOC, 25 mV each step 0x0: 0.8V 0xE: 1.15V 0x1F:1.575V"]
305pub mod TRG {
306pub const offset: u32 = 0;
307pub const mask: u32 = 0x1f << offset;
308pub mod R {}
309pub mod W {}
310pub mod RW {}
311 }
312#[doc = "Target value of standby (low power) mode 0x0: 0"]
313pub mod TARGET_LP {
314pub const offset: u32 = 8;
315pub const mask: u32 = 0x07 << offset;
316pub mod R {}
317pub mod W {}
318pub mod RW {}
319 }
320#[doc = "Set DCDC clock to half freqeuncy for continuous mode"]
321pub mod MINPWR_DC_HALFCLK {
322pub const offset: u32 = 24;
323pub const mask: u32 = 0x01 << offset;
324pub mod R {}
325pub mod W {}
326pub mod RW {}
327 }
328#[doc = "Ajust delay to reduce ground noise"]
329pub mod MISC_DELAY_TIMING {
330pub const offset: u32 = 27;
331pub const mask: u32 = 0x01 << offset;
332pub mod R {}
333pub mod W {}
334pub mod RW {}
335 }
336#[doc = "Reserved"]
337pub mod MISC_DISABLEFET_LOGIC {
338pub const offset: u32 = 28;
339pub const mask: u32 = 0x01 << offset;
340pub mod R {}
341pub mod W {}
342pub mod RW {}
343 }
344#[doc = "Disable stepping for the output VDD_SOC of DCDC"]
345pub mod DISABLE_STEP {
346pub const offset: u32 = 30;
347pub const mask: u32 = 0x01 << offset;
348pub mod R {}
349pub mod W {}
350pub mod RW {}
351 }
352}