RAFW Flexible Software Package Documentation  Release v2.0.1

 
CLK

Functions

bool bsp_clock_xtalm_is_settled (void)
 
int16_t hw_clk_xtalm_update_rdy_cnt (void)
 Update XTAL40M Ready IRQ counter. More...
 
void hw_clk_xtalm_compensate_amp (void)
 Perform XTAL40M RCOSC amplitude temperature compensation.
 
void hw_clk_xtalm_configure (void)
 Configure XTAL40M.
 
__RETAINED_CODE uint32_t hw_clk_pll_sys_on (void)
 Enable the PLL.
 
__RETAINED_CODE void hw_clk_pll_sys_off (void)
 Disable the PLL. More...
 
__RETAINED_CODE void pll_on (void)
 Enable PLL.
 
__RETAINED_CODE void pll_off (void)
 Disable PLL.
 
BSP_PLACE_CODE_IN_RAM void bsp_prv_rtc_mirror_init (void)
 
BSP_PLACE_CODE_IN_RAM lp_clk_is_t bsp_prv_lpclk_get ()
 
BSP_PLACE_CODE_IN_RAM fsp_err_t bsp_prv_lpclk_select (lp_clk_is_t type)
 Selects the low power clock source. More...
 

Detailed Description

Files

file  ra6w1/bsp_clocks.c
 Clock Driver.
 

Function Documentation

◆ bsp_clock_xtalm_is_settled()

bool bsp_clock_xtalm_is_settled ( void  )

Checks if the main oscillator (XTALM) has settled.

Returns
true if XTALM has settled, false if it hasn't.

◆ hw_clk_xtalm_update_rdy_cnt()

int16_t hw_clk_xtalm_update_rdy_cnt ( void  )

Update XTAL40M Ready IRQ counter.

Returns
The difference between the new and the old XTAL40M Ready IRQ counter in cycles of 32KHz clocks.

◆ hw_clk_pll_sys_off()

__RETAINED_CODE void hw_clk_pll_sys_off ( void  )

Disable the PLL.

Warning
The System clock must have been set to XTAL40M before calling this function!

◆ bsp_prv_rtc_mirror_init()

BSP_PLACE_CODE_IN_RAM void bsp_prv_rtc_mirror_init ( void  )

Enable mirror for acessing RTC register.

Note
The RTC block uses a 32khz clock. Because of this, bus access also uses 32khz. Using a mirror, you can access the RTC register using the CPU's clock.

◆ bsp_prv_lpclk_get()

BSP_PLACE_CODE_IN_RAM lp_clk_is_t bsp_prv_lpclk_get ( )

Gets the current low power clock source selection.

Returns
The current low power clock source type.

◆ bsp_prv_lpclk_select()

BSP_PLACE_CODE_IN_RAM fsp_err_t bsp_prv_lpclk_select ( lp_clk_is_t  type)

Selects the low power clock source.

This function selects the low power clock source based on the input type. It checks the current clock selection and updates it if available.

Parameters
[in]typeThe desired low power clock source type.
Returns
The selected low power clock source type.
Note
The lp clock has internal rcx and external xtal32k. It usually takes about 1 second after POR for XTAL_RDY_BAT_RD_STATUS to become 1.