![]() |
Synergy Software Package User's Manual
|
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) |
Functions in this file configure the system clocks based upon the macros in bsp_clock_cfg.h.
| void bsp_clock_init | ( | void | ) |
Sets up system clocks.
MOCO is default clock out of reset. Enable new clock if chosen.
PLL Source clock is always the main oscillator.
Need to start PLL source clock and let it stabilize before starting PLL
Set PLL Divider.
Set PLL Multiplier.
PLL Source clock is always the main oscillator.
Wait for PLL clock source to stabilize
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.
If the USB clock source requested is HOCO set the corresponding bit in the USBCKCR register
| 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
| __STATIC_INLINE uint32_t bsp_clocks_mem_wait_get | ( | void | ) |
This function gets the value of the MEMWAIT register.
| MEMWAIT | setting |
| __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.
| [in] | setting |
| none |
| uint32_t bsp_cpu_clock_get | ( | void | ) |
Returns frequency of CPU clock in Hz.
| Frequency | of the CPU in Hertz |