41 const uint32_t kHz = 1000;
42 const uint32_t MHz = 1000 * kHz;
44 if (freq > 600 * kHz && freq <= 2 * MHz) {
46 }
else if (freq > 2 * MHz && freq <= 4 * MHz) {
48 }
else if (freq > 4 * MHz && freq <= 8 * MHz) {
50 }
else if (freq > 8 * MHz && freq <= 16 * MHz) {
52 }
else if (freq > 16 * MHz && freq <= 30 * MHz) {
#define SCIF_OSCCTRL_GAIN_SHIFT
#define SCIF_OSCCTRL0_KEY
#define SCIF_PLL0_PLLMUL_MASKED(V)
#define SCIF_PLL0_PLLDIV_MASKED(V)
#define SCIF_GCCTRL_DIV_MASKED(V)
#define SCIF_GCCTRL_OSCSEL_MASKED(V)
#define SCIF_PLL0_PLLOPT_MASKED(V)
#define SCIF_PLL0_PLLOSC_MASKED(V)
#define SCIF_PLL0_PLLCOUNT_MASKED(V)
#define SCIF_OSCCTRL_OSCEN
#define SCIF_OSCCTRL_STARTUP_SHIFT
#define SCIF_GCCTRL_DIVEN
int scif_osc_enable(enum osc_mode mode, uint32_t freq, enum osc_startup startup)
Enable external oscillator.
void scif_enable_gclk(enum generic_clock gclk, enum gclk_src source_clock, uint16_t div)
Configure and enable Generic Clock.
int scif_enable_pll(uint8_t delay, uint8_t mul, uint8_t div, uint8_t pll_opt, enum pll_clk_src source_clock)
Configure and enable PLL clock.