1 /*
2 * Copyright (c) 2021 HPMicro
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8 #ifndef HPM_PCFG_DRV_H
9 #define HPM_PCFG_DRV_H
10
11 #include "hpm_common.h"
12 #include "hpm_pcfg_regs.h"
13
14 /**
15 *
16 * @brief PCFG driver APIs
17 * @defgroup pcfg_interface PCFG driver APIs
18 * @ingroup io_interfaces
19 * @{
20 */
21 #define PCFG_CLOCK_GATE_MODE_ALWAYS_ON (0x3UL)
22 #define PCFG_CLOCK_GATE_MODE_ALWAYS_OFF (0x2UL)
23
24 #define PCFG_PERIPH_KEEP_CLOCK_ON(p) (PCFG_CLOCK_GATE_MODE_ALWAYS_ON << (p))
25 #define PCFG_PERIPH_KEEP_CLOCK_OFF(p) (PCFG_CLOCK_GATE_MODE_ALWAYS_OFF << (p))
26
27 /* @brief PCFG irc24m reference */
28 typedef enum {
29 pcfg_irc24m_reference_32k = 0,
30 pcfg_irc24m_reference_24m_xtal = 1
31 } pcfg_irc24m_reference_t;
32
33 /* @brief PCFG dcdc current limit */
34 typedef enum {
35 pcfg_dcdc_lp_current_limit_250ma = 0,
36 pcfg_dcdc_lp_current_limit_200ma = 1,
37 } pcfg_dcdc_lp_current_limit_t;
38
39 /* @brief PCFG dcdc current hys */
40 typedef enum {
41 pcfg_dcdc_current_hys_12_5mv = 0,
42 pcfg_dcdc_current_hys_25mv = 1,
43 } pcfg_dcdc_current_hys_t;
44
45 /* @brief PCFG dcdc mode */
46 typedef enum {
47 pcfg_dcdc_mode_off = 0,
48 pcfg_dcdc_mode_basic = 1,
49 pcfg_dcdc_mode_general = 3,
50 pcfg_dcdc_mode_expert = 7,
51 } pcfg_dcdc_mode_t;
52
53 /* @brief PCFG pmc domain peripherals */
54 typedef enum {
55 pcfg_pmc_periph_fuse = 0,
56 pcfg_pmc_periph_ram = 2,
57 pcfg_pmc_periph_vad = 4,
58 pcfg_pmc_periph_gpio = 6,
59 pcfg_pmc_periph_ioc = 8,
60 pcfg_pmc_periph_timer = 10,
61 pcfg_pmc_periph_wdog = 12,
62 pcfg_pmc_periph_uart = 14,
63 pcfg_pmc_periph_debug = 16,
64 } pcfg_pmc_periph_t;
65
66 /* @brief PCFG status */
67 enum {
68 status_pcfg_ldo_out_of_range = MAKE_STATUS(status_group_pcfg, 1),
69 };
70
71 /* @brief PCFG irc24m config */
72 typedef struct {
73 uint32_t freq_in_hz;
74 pcfg_irc24m_reference_t reference;
75 bool return_to_default_on_xtal_loss;
76 bool free_run;
77 } pcfg_irc24m_config_t;
78
79
80 #define PCFG_CLOCK_GATE_CONTROL_MASK(module, mode) \
81 ((uint32_t) (mode) << ((module) << 1))
82
83 #define PCFG_DEBUG_STOP_SOURCE_ENABLE_CORE0 (PCFG_DEBUG_STOP_CPU0_MASK)
84 #define PCFG_DEBUG_STOP_SOURCE_DISABLE_CORE0 (0)
85 #define PCFG_DEBUG_STOP_SOURCE_ENABLE_CORE1 (PCFG_DEBUG_STOP_CPU1_MASK)
86 #define PCFG_DEBUG_STOP_SOURCE_DISABLE_CORE1 (0)
87
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
91
92 /**
93 * @brief bandgap disable power save mode
94 *
95 * @param[in] ptr base address
96 */
pcfg_bandgap_disable_power_save_mode(PCFG_Type * ptr)97 static inline void pcfg_bandgap_disable_power_save_mode(PCFG_Type *ptr)
98 {
99 ptr->BANDGAP &= ~PCFG_BANDGAP_POWER_SAVE_MASK;
100 }
101
102 /**
103 * @brief bandgap enable power save mode
104 *
105 * @param[in] ptr base address
106 */
pcfg_bandgap_enable_power_save_mode(PCFG_Type * ptr)107 static inline void pcfg_bandgap_enable_power_save_mode(PCFG_Type *ptr)
108 {
109 ptr->BANDGAP |= PCFG_BANDGAP_POWER_SAVE_MASK;
110 }
111
112 /**
113 * @brief bandgap disable power save mode
114 *
115 * @param[in] ptr base address
116 */
pcfg_bandgap_disable_lowpower_mode(PCFG_Type * ptr)117 static inline void pcfg_bandgap_disable_lowpower_mode(PCFG_Type *ptr)
118 {
119 ptr->BANDGAP &= ~PCFG_BANDGAP_LOWPOWER_MODE_MASK;
120 }
121
122 /**
123 * @brief bandgap enable low power mode
124 *
125 * @param[in] ptr base address
126 */
pcfg_bandgap_enable_lowpower_mode(PCFG_Type * ptr)127 static inline void pcfg_bandgap_enable_lowpower_mode(PCFG_Type *ptr)
128 {
129 ptr->BANDGAP |= PCFG_BANDGAP_LOWPOWER_MODE_MASK;
130 }
131
132 /**
133 * @brief check if bandgap is trimmed or not
134 *
135 * @param[in] ptr base address
136 *
137 * @retval true if bandgap is trimmed
138 */
pcfg_bandgap_is_trimmed(PCFG_Type * ptr)139 static inline bool pcfg_bandgap_is_trimmed(PCFG_Type *ptr)
140 {
141 return ptr->BANDGAP & PCFG_BANDGAP_VBG_TRIMMED_MASK;
142 }
143
144 /**
145 * @brief bandgap reload trim value
146 *
147 * @param[in] ptr base address
148 */
pcfg_bandgap_reload_trim(PCFG_Type * ptr)149 static inline void pcfg_bandgap_reload_trim(PCFG_Type *ptr)
150 {
151 ptr->BANDGAP &= ~PCFG_BANDGAP_VBG_TRIMMED_MASK;
152 }
153
154 /**
155 * @brief turn off LDO2P5
156 *
157 * @param[in] ptr base address
158 */
pcfg_ldo2p5_turn_off(PCFG_Type * ptr)159 static inline void pcfg_ldo2p5_turn_off(PCFG_Type *ptr)
160 {
161 ptr->LDO2P5 &= ~PCFG_LDO2P5_ENABLE_MASK;
162 }
163
164 /**
165 * @brief turn on LDO 2.5V
166 *
167 * @param[in] ptr base address
168 */
pcfg_ldo2p5_turn_on(PCFG_Type * ptr)169 static inline void pcfg_ldo2p5_turn_on(PCFG_Type *ptr)
170 {
171 ptr->LDO2P5 |= PCFG_LDO2P5_ENABLE_MASK;
172 }
173
174 /**
175 * @brief check if LDO 2.5V is stable
176 *
177 * @param[in] ptr base address
178 *
179 * @retval true if LDO2P5 is stable
180 */
pcfg_ldo2p5_is_stable(PCFG_Type * ptr)181 static inline bool pcfg_ldo2p5_is_stable(PCFG_Type *ptr)
182 {
183 return PCFG_LDO2P5_READY_GET(ptr->LDO2P5);
184 }
185
186 /*
187 * @brief check if DCDC is stable or not
188 * @param[in] ptr base address
189 * @retval true if DCDC is stable
190 */
pcfg_dcdc_is_stable(PCFG_Type * ptr)191 static inline bool pcfg_dcdc_is_stable(PCFG_Type *ptr)
192 {
193 return PCFG_DCDC_MODE_READY_GET(ptr->DCDC_MODE);
194 }
195
196 /*
197 * @brief set DCDC work mode
198 * @param[in] ptr base address
199 */
pcfg_dcdc_set_mode(PCFG_Type * ptr,uint8_t mode)200 static inline void pcfg_dcdc_set_mode(PCFG_Type *ptr, uint8_t mode)
201 {
202 ptr->DCDC_MODE = (ptr->DCDC_MODE & ~PCFG_DCDC_MODE_MODE_MASK) | PCFG_DCDC_MODE_MODE_SET(mode);
203 }
204
205 /**
206 * @brief set low power current limit
207 *
208 * @param[in] ptr base address
209 * @param[in] limit current limit at low power mode
210 * @param[in] over_limit unused parameter, will be discarded
211 */
pcfg_dcdc_set_lp_current_limit(PCFG_Type * ptr,pcfg_dcdc_lp_current_limit_t limit,bool over_limit)212 static inline void pcfg_dcdc_set_lp_current_limit(PCFG_Type *ptr, pcfg_dcdc_lp_current_limit_t limit, bool over_limit)
213 {
214 (void) over_limit;
215 ptr->DCDC_PROT = (ptr->DCDC_PROT & ~PCFG_DCDC_PROT_ILIMIT_LP_MASK) | PCFG_DCDC_PROT_ILIMIT_LP_SET(limit);
216 }
217
218 /**
219 * @brief disable power loss protection
220 *
221 * @param[in] ptr base address
222 */
pcfg_dcdc_disable_power_loss_prot(PCFG_Type * ptr)223 static inline void pcfg_dcdc_disable_power_loss_prot(PCFG_Type *ptr)
224 {
225 ptr->DCDC_PROT |= PCFG_DCDC_PROT_DISABLE_POWER_LOSS_MASK;
226 }
227
228 /**
229 * @brief enable power loss protection
230 *
231 * @param[in] ptr base address
232 */
pcfg_dcdc_enable_power_loss_prot(PCFG_Type * ptr)233 static inline void pcfg_dcdc_enable_power_loss_prot(PCFG_Type *ptr)
234 {
235 ptr->DCDC_PROT &= ~PCFG_DCDC_PROT_DISABLE_POWER_LOSS_MASK;
236 }
237
238 /**
239 * @brief check if power loss flag is set
240 *
241 * @param[in] ptr base address
242 *
243 * @retval true if power loss is set
244 */
pcfg_dcdc_is_power_loss(PCFG_Type * ptr)245 static inline bool pcfg_dcdc_is_power_loss(PCFG_Type *ptr)
246 {
247 return PCFG_DCDC_PROT_POWER_LOSS_FLAG_GET(ptr->DCDC_PROT);
248 }
249
250 /**
251 * @brief disable over voltage protection
252 *
253 * @param[in] ptr base address
254 */
pcfg_dcdc_disable_over_voltage_prot(PCFG_Type * ptr)255 static inline void pcfg_dcdc_disable_over_voltage_prot(PCFG_Type *ptr)
256 {
257 ptr->DCDC_PROT |= PCFG_DCDC_PROT_DISABLE_OVERVOLTAGE_MASK;
258 }
259
260 /**
261 * @brief enable over voltage protection
262 *
263 * @param[in] ptr base address
264 */
pcfg_dcdc_ensable_over_voltage_prot(PCFG_Type * ptr)265 static inline void pcfg_dcdc_ensable_over_voltage_prot(PCFG_Type *ptr)
266 {
267 ptr->DCDC_PROT &= ~PCFG_DCDC_PROT_DISABLE_OVERVOLTAGE_MASK;
268 }
269
270 /**
271 * @brief checkover voltage flag
272 *
273 * @param[in] ptr base address
274 * @retval true if flag is set
275 */
pcfg_dcdc_is_over_voltage(PCFG_Type * ptr)276 static inline bool pcfg_dcdc_is_over_voltage(PCFG_Type *ptr)
277 {
278 return PCFG_DCDC_PROT_OVERVOLT_FLAG_GET(ptr->DCDC_PROT) & PCFG_DCDC_PROT_OVERVOLT_FLAG_MASK;
279 }
280
281 /**
282 * @brief disable current measurement
283 *
284 * @param[in] ptr base address
285 */
pcfg_dcdc_disable_measure_current(PCFG_Type * ptr)286 static inline void pcfg_dcdc_disable_measure_current(PCFG_Type *ptr)
287 {
288 ptr->DCDC_CURRENT &= ~PCFG_DCDC_CURRENT_ESTI_EN_MASK;
289 }
290
291 /**
292 * @brief enable current measurement
293 *
294 * @param[in] ptr base address
295 */
pcfg_dcdc_enable_measure_current(PCFG_Type * ptr)296 static inline void pcfg_dcdc_enable_measure_current(PCFG_Type *ptr)
297 {
298 ptr->DCDC_CURRENT |= PCFG_DCDC_CURRENT_ESTI_EN_MASK;
299 }
300
301 /**
302 * @brief check if measured current is valid
303 *
304 * @param[in] ptr base address
305 *
306 * @retval true if measured current is valid
307 */
pcfg_dcdc_is_measure_current_valid(PCFG_Type * ptr)308 static inline bool pcfg_dcdc_is_measure_current_valid(PCFG_Type *ptr)
309 {
310 return ptr->DCDC_CURRENT & PCFG_DCDC_CURRENT_VALID_MASK;
311 }
312
313 /**
314 * @brief get DCDC start time in number of 24MHz clock cycles
315 *
316 * @param[in] ptr base address
317 *
318 * @retval dcdc start time in cycles
319 */
pcfg_dcdc_get_start_time_in_cycle(PCFG_Type * ptr)320 static inline uint32_t pcfg_dcdc_get_start_time_in_cycle(PCFG_Type *ptr)
321 {
322 return PCFG_DCDC_START_TIME_START_TIME_GET(ptr->DCDC_START_TIME);
323 }
324
325 /**
326 * @brief get DCDC resume time in number of 24MHz clock cycles
327 *
328 * @param[in] ptr base address
329 *
330 * @retval dcdc resuem time in cycles
331 */
pcfg_dcdc_get_resume_time_in_cycle(PCFG_Type * ptr)332 static inline uint32_t pcfg_dcdc_get_resume_time_in_cycle(PCFG_Type *ptr)
333 {
334 return PCFG_DCDC_RESUME_TIME_RESUME_TIME_GET(ptr->DCDC_RESUME_TIME);
335 }
336
337 /**
338 * @brief set DCDC start time in 24MHz clock cycles
339 *
340 * @param[in] ptr base address
341 * @param[in] cycles start time in cycles
342 */
pcfg_dcdc_set_start_time_in_cycle(PCFG_Type * ptr,uint32_t cycles)343 static inline void pcfg_dcdc_set_start_time_in_cycle(PCFG_Type *ptr, uint32_t cycles)
344 {
345 ptr->DCDC_START_TIME = PCFG_DCDC_START_TIME_START_TIME_SET(cycles);
346 }
347
348 /**
349 * @brief set DCDC resuem time in 24MHz clock cycles
350 *
351 * @param[in] ptr base address
352 * @param[in] cycles resume time in cycles
353 */
pcfg_dcdc_set_resume_time_in_cycle(PCFG_Type * ptr,uint32_t cycles)354 static inline void pcfg_dcdc_set_resume_time_in_cycle(PCFG_Type *ptr, uint32_t cycles)
355 {
356 ptr->DCDC_RESUME_TIME = PCFG_DCDC_RESUME_TIME_RESUME_TIME_SET(cycles);
357 }
358
359 /**
360 * @brief set dcdc current hysteres range
361 *
362 * @param[in] ptr base address
363 * @param[in] range current hysteres range
364 */
pcfg_dcdc_set_current_hys_range(PCFG_Type * ptr,pcfg_dcdc_current_hys_t range)365 static inline void pcfg_dcdc_set_current_hys_range(PCFG_Type *ptr, pcfg_dcdc_current_hys_t range)
366 {
367 ptr->DCDC_MISC = (ptr->DCDC_MISC & (~PCFG_DCDC_MISC_OL_HYST_MASK)) | PCFG_DCDC_MISC_OL_HYST_SET(range);
368 }
369
370 /**
371 * @brief disable power trap
372 *
373 * @param[in] ptr base address
374 */
pcfg_disable_power_trap(PCFG_Type * ptr)375 static inline void pcfg_disable_power_trap(PCFG_Type *ptr)
376 {
377 ptr->POWER_TRAP &= ~PCFG_POWER_TRAP_TRAP_MASK;
378 }
379
380 /**
381 * @brief enable power trap
382 *
383 * @param[in] ptr base address
384 */
pcfg_enable_power_trap(PCFG_Type * ptr)385 static inline void pcfg_enable_power_trap(PCFG_Type *ptr)
386 {
387 ptr->POWER_TRAP |= PCFG_POWER_TRAP_TRAP_MASK;
388 }
389
390 /**
391 * @brief check if power trap is triggered
392 *
393 * @param[in] ptr base address
394 *
395 * @retval true if power trap is triggered
396 */
pcfg_is_power_trap_triggered(PCFG_Type * ptr)397 static inline bool pcfg_is_power_trap_triggered(PCFG_Type *ptr)
398 {
399 return ptr->POWER_TRAP & PCFG_POWER_TRAP_TRIGGERED_MASK;
400 }
401
402 /**
403 * @brief clear power trap trigger flag
404 *
405 * @param[in] ptr base address
406 */
pcfg_clear_power_trap_trigger_flag(PCFG_Type * ptr)407 static inline void pcfg_clear_power_trap_trigger_flag(PCFG_Type *ptr)
408 {
409 ptr->POWER_TRAP |= PCFG_POWER_TRAP_TRIGGERED_MASK;
410 }
411
412 /**
413 * @brief disable dcdc retention
414 *
415 * @param[in] ptr base address
416 */
pcfg_disable_dcdc_retention(PCFG_Type * ptr)417 static inline void pcfg_disable_dcdc_retention(PCFG_Type *ptr)
418 {
419 ptr->POWER_TRAP &= ~PCFG_POWER_TRAP_RETENTION_MASK;
420 }
421
422 /**
423 * @brief enable dcdc retention to retain soc sram data
424 *
425 * @param[in] ptr base address
426 */
pcfg_enable_dcdc_retention(PCFG_Type * ptr)427 static inline void pcfg_enable_dcdc_retention(PCFG_Type *ptr)
428 {
429 ptr->POWER_TRAP |= PCFG_POWER_TRAP_RETENTION_MASK;
430 }
431
432 /**
433 * @brief clear wakeup cause flag
434 *
435 * @param[in] ptr base address
436 * @param[in] mask mask of flags to be cleared
437 */
pcfg_clear_wakeup_cause(PCFG_Type * ptr,uint32_t mask)438 static inline void pcfg_clear_wakeup_cause(PCFG_Type *ptr, uint32_t mask)
439 {
440 ptr->WAKE_CAUSE |= mask;
441 }
442
443 /**
444 * @brief get wakeup cause
445 *
446 * @param[in] ptr base address
447 *
448 * @retval mask of wake cause
449 */
pcfg_get_wakeup_cause(PCFG_Type * ptr)450 static inline uint32_t pcfg_get_wakeup_cause(PCFG_Type *ptr)
451 {
452 return ptr->WAKE_CAUSE;
453 }
454
455 /**
456 * @brief enable wakeup source
457 *
458 * @param[in] ptr base address
459 * @param[in] mask wakeup source mask
460 */
pcfg_enable_wakeup_source(PCFG_Type * ptr,uint32_t mask)461 static inline void pcfg_enable_wakeup_source(PCFG_Type *ptr, uint32_t mask)
462 {
463 ptr->WAKE_MASK &= ~mask;
464 }
465
466 /**
467 * @brief disable wakeup source
468 *
469 * @param[in] ptr base address
470 * @param[in] mask source to be disabled as wakeup source
471 */
pcfg_disable_wakeup_source(PCFG_Type * ptr,uint32_t mask)472 static inline void pcfg_disable_wakeup_source(PCFG_Type *ptr, uint32_t mask)
473 {
474 ptr->WAKE_MASK |= mask;
475 }
476
477 /**
478 * @brief set clock gate mode in vpmc domain
479 *
480 * @param[in] ptr base address
481 * @param[in] mode clock gate mode mask
482 */
pcfg_set_periph_clock_mode(PCFG_Type * ptr,uint32_t mode)483 static inline void pcfg_set_periph_clock_mode(PCFG_Type *ptr, uint32_t mode)
484 {
485 ptr->SCG_CTRL = mode;
486 }
487
488 /**
489 * @brief Disable CPU0 debug stop notficiation to peripherals
490 *
491 * @param[in] ptr
492 */
pcfg_disable_cpu0_debug_stop_notfication(PCFG_Type * ptr)493 static inline void pcfg_disable_cpu0_debug_stop_notfication(PCFG_Type *ptr)
494 {
495 ptr->DEBUG_STOP &= ~PCFG_DEBUG_STOP_CPU0_MASK;
496 }
497
498 /**
499 * @brief Enable CPU0 debug stop notification to peripherals
500 *
501 * @param[in] ptr
502 */
pcfg_enable_cpu0_debug_stop_notfication(PCFG_Type * ptr)503 static inline void pcfg_enable_cpu0_debug_stop_notfication(PCFG_Type *ptr)
504 {
505 ptr->DEBUG_STOP |= PCFG_DEBUG_STOP_CPU0_MASK;
506 }
507
508 /**
509 * @brief Disable CPU1 debug stop notification to peripherals
510 *
511 * @param[in] ptr
512 */
pcfg_disable_cpu1_debug_stop_notfication(PCFG_Type * ptr)513 static inline void pcfg_disable_cpu1_debug_stop_notfication(PCFG_Type *ptr)
514 {
515 ptr->DEBUG_STOP &= ~PCFG_DEBUG_STOP_CPU1_MASK;
516 }
517
518 /**
519 * @brief Enable CPU1 debug stop notification to peripherals
520 *
521 * @param[in] ptr
522 */
pcfg_enable_cpu1_debug_stop_notfication(PCFG_Type * ptr)523 static inline void pcfg_enable_cpu1_debug_stop_notfication(PCFG_Type *ptr)
524 {
525 ptr->DEBUG_STOP |= PCFG_DEBUG_STOP_CPU1_MASK;
526 }
527
528 /**
529 * @brief Configure CPU core debug stop notification to peripherals
530 *
531 * @param[in] ptr
532 * @param[in] mask
533 */
pcfg_config_debug_stop_notification(PCFG_Type * ptr,uint8_t mask)534 static inline void pcfg_config_debug_stop_notification(PCFG_Type *ptr, uint8_t mask)
535 {
536 ptr->DEBUG_STOP = mask;
537 }
538
539 /**
540 * @brief check if irc24m is trimmed
541 *
542 * @param[in] ptr base address
543 *
544 * @retval true if it is trimmed
545 */
pcfg_irc24m_is_trimmed(PCFG_Type * ptr)546 static inline bool pcfg_irc24m_is_trimmed(PCFG_Type *ptr)
547 {
548 return ptr->RC24M & PCFG_RC24M_RC_TRIMMED_MASK;
549 }
550
551 /**
552 * @brief reload irc24m trim value
553 *
554 * @param[in] ptr base address
555 */
pcfg_irc24m_reload_trim(PCFG_Type * ptr)556 static inline void pcfg_irc24m_reload_trim(PCFG_Type *ptr)
557 {
558 ptr->RC24M &= ~PCFG_RC24M_RC_TRIMMED_MASK;
559 }
560
561 /**
562 * @brief config irc24m track
563 *
564 * @param[in] ptr base address
565 * @param[in] config config data
566 */
567 void pcfg_irc24m_config_track(PCFG_Type *ptr, pcfg_irc24m_config_t *config);
568
569 /*
570 * @brief set DCDC voltage at standby mode
571 * @param[in] ptr base address
572 * @param[in] mv target voltage
573 * @retval status_success if successfully configured
574 */
575 hpm_stat_t pcfg_dcdc_set_lpmode_voltage(PCFG_Type *ptr, uint16_t mv);
576
577 /*
578 * @brief set output voltage of LDO 2.5V in mV
579 * @param[in] ptr base address
580 * @param[in] mv target voltage
581 * @retval status_success if successfully configured
582 */
583 hpm_stat_t pcfg_ldo2p5_set_voltage(PCFG_Type *ptr, uint16_t mv);
584
585 /*
586 * @brief set DCDC voltage
587 * @param[in] ptr base address
588 * @param[in] mv target voltage
589 * @retval status_success if successfully configured
590 */
591 hpm_stat_t pcfg_dcdc_set_voltage(PCFG_Type *ptr, uint16_t mv);
592
593 /*
594 * @brief set output voltage of LDO 1V in mV
595 * @param[in] ptr base address
596 * @param[in] mv target voltage
597 * @retval status_success if successfully configured
598 */
599 hpm_stat_t pcfg_ldo1p1_set_voltage(PCFG_Type *ptr, uint16_t mv);
600
601 /*
602 * @brief get current DCDC current level in mA
603 *
604 * @param[in] ptr base address
605 * @retval Current level at mA
606 */
607 uint16_t pcfg_dcdc_get_current_level(PCFG_Type *ptr);
608
609
610 #ifdef __cplusplus
611 }
612 #endif
613 /**
614 * @}
615 */
616
617 #endif /* HPM_PCFG_DRV_H */
618