|
SmartSnippets DA1459x SDK
|
Go to the documentation of this file.
44 #ifndef SYS_CLOCK_MGR_H_
45 #define SYS_CLOCK_MGR_H_
52 cm_sysclk_div1_clk_in_use,
53 cm_sysclk_ahb_divider_in_use,
54 cm_sysclk_dblr_used_by_task,
55 cm_sysclk_higher_prio_used,
56 cm_sysclk_invalid_clock,
57 cm_sysclk_max_requested,
58 cm_sysclk_not_requested,
60 } cm_sys_clk_status_t;
292 __RETAINED_CODE uint32_t cm_rcx_us_2_lpcycles(uint32_t usec);
303 uint32_t cm_rcx_us_2_lpcycles_low_acc(uint32_t usec);
319 void cm_rc_clocks_calibration_task_init(
void);
328 void cm_lp_clk_init(
void);
337 bool cm_lp_clk_is_avail(
void);
346 bool cm_lp_clk_is_avail_fromISR(
void);
353 void cm_wait_lp_clk_ready(
void);
364 __RETAINED_CODE
void cm_lp_clk_wakeup(
void);
ahb_div_t cm_ahb_get_clock_divider(void)
Returns the AMBA High speed Bus clock divider.
cpu_clk_t cm_cpu_clk_get(void)
Returns the CPU clock frequency.
enum apbdiv_type apb_div_t
The AMBA Peripheral Bus (APB) clock divider.
sys_clk_t cm_sys_clk_get_fromISR(void)
Returns the sys_clk that the system uses at that moment (interrupt safe version).
void cm_sys_clk_set_priority(sys_clk_t *sys_clk_prio_array)
Set the system clock priority.
void cm_wait_dblr_ready(void)
Block until the Doubler is ready.
__RETAINED_CODE bool cm_poll_xtalm_ready(void)
Check if the fast XTAL clock (XTALxxM) is ready.
cm_sys_clk_status_t cm_sys_clk_release(sys_clk_t type)
Restores the system clock. It terminates a matching request.
void cm_apb_set_clock_divider(apb_div_t div)
Change the divider of the AMBA Peripheral Bus clock.
__RETAINED_CODE void cm_sys_clk_sleep(bool entering_sleep)
Set the system clock (unprotected).
void cm_calibrate_rc32m(void)
Calibrate RC32M.
enum sysclk_type sys_clk_t
The system clock type.
void cm_enable_xtalm(void)
Start the fast XTAL clock (XTALxxM)
enum ahbdiv_type ahb_div_t
The AMBA High-Performance Bus (AHB) clock divider.
bool cm_ahb_set_clock_divider(ahb_div_t div)
Change the divider of the AMBA High speed Bus clock.
cpu_clk_t cm_cpu_clk_get_fromISR(void)
Returns the CPU clock frequency (interrupt safe).
apb_div_t cm_apb_get_clock_divider(void)
Returns the AMBA Peripheral Bus clock divider.
cm_sys_clk_status_t cm_sys_clk_request(sys_clk_t type)
Request for system clock switch.
Clock Driver header file.
sys_clk_t cm_sys_clk_get(void)
Returns the sys_clk that the system uses at that moment.
void cm_calibrate_rclp(void)
Calibrate RCLP.
__RETAINED_CODE void cm_halt_until_sysclk_ready(void)
Halt until system clock (either PLL or XTAL32M) is ready.
void cm_wait_xtalm_ready(void)
Block until the fast XTAL clock (XTALxxM) is ready. If the fast XTAL clock (XTALxxM) is running then ...
void cm_sys_clk_init(sys_clk_t type)
Initialize clocks after power-up.
enum cpu_clk_type cpu_clk_t
The CPU clock type (speed)
void cm_register_xtal_ready_callback(void(*cb)(void))
Register a callback function to be called then XTAL32M is ready.
__RETAINED_CODE void cm_halt_until_xtalm_ready(void)
Halt until the fast XTAL clock (XTALxxM) has settled.