Synergy Software Package User's Manual
Clock Initialization

Functions

void bsp_clock_init (void)
 Sets up system clocks. More...
 
uint32_t bsp_cpu_clock_get (void)
 Returns frequency of CPU clock in Hz. More...
 
__STATIC_INLINE void bsp_clocks_mem_wait_set (uint32_t setting)
 This function sets the value of the MEMWAIT register which controls wait cycles for flash read access. More...
 
__STATIC_INLINE uint32_t bsp_clocks_mem_wait_get (void)
 This function gets the value of the MEMWAIT register. More...
 
ssp_err_t bsp_clock_set_callback (bsp_clock_set_callback_args_t *p_args)
 

Detailed Description

Functions in this file configure the system clocks based upon the macros in bsp_clock_cfg.h.

Function Documentation

◆ bsp_clock_init()

void bsp_clock_init ( void  )

Sets up system clocks.

MOCO is default clock out of reset. Enable new clock if chosen. S1JA has no PLL.

If the system clock has failed to start call the unrecoverable error handler.

MOCO, LOCO, and subclock do not have stabilization flags that can be checked.

Wait for clock source to stabilize

Set which clock to use for system clock and divisors for all system clocks.

If the system clock has failed to be configured properly call the unrecoverable error handler.

◆ bsp_clock_set_callback()

ssp_err_t bsp_clock_set_callback ( bsp_clock_set_callback_args_t *  p_args)

The current frequency must be less than 32 MHz and the mcu must be in high speed mode, before changing wait cycles to 0.

< No MEMWAIT cycles

◆ bsp_clocks_mem_wait_get()

__STATIC_INLINE uint32_t bsp_clocks_mem_wait_get ( void  )

This function gets the value of the MEMWAIT register.

Return values
MEMWAITsetting

◆ bsp_clocks_mem_wait_set()

__STATIC_INLINE void bsp_clocks_mem_wait_set ( uint32_t  setting)

This function sets the value of the MEMWAIT register which controls wait cycles for flash read access.

Parameters
[in]setting
Return values
none

◆ bsp_cpu_clock_get()

uint32_t bsp_cpu_clock_get ( void  )

Returns frequency of CPU clock in Hz.

Return values
Frequencyof the CPU in Hertz