|
VSF Documented
|
#include "hal/vsf_hal_cfg.h"#include "./device.h"#include "./driver.h"#include "pico/platform.h"#include "hardware/platform_defs.h"#include "hardware/address_mapped.h"#include "hardware/regs/resets.h"#include "hardware/regs/watchdog.h"#include "hardware/structs/xosc.h"#include "hardware/structs/clocks.h"#include "hardware/structs/pll.h"#include "hardware/structs/resets.h"#include "hardware/structs/watchdog.h"#include "hal/driver/common/swi/arm/vsf_swi_template.inc"Macros | |
| #define | KHZ 1000 |
| #define | MHZ 1000000 |
| #define | PICO_PLL_VCO_MIN_FREQ_KHZ (750 * KHZ) |
| #define | PICO_PLL_VCO_MAX_FREQ_KHZ (1600 * KHZ) |
| #define | PLL_COMMON_REFDIV 1 |
| \tag::pll_settings[] | |
| #define | USB_CLK_KHZ 48000 |
| #define | PLL_USB_REFDIV PLL_COMMON_REFDIV |
| #define | PLL_USB_VCO_FREQ_KHZ (1200 * KHZ) |
| #define | PLL_USB_POSTDIV1 5 |
| #define | PLL_USB_POSTDIV2 5 |
| #define | PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 |
| #define | STARTUP_DELAY (((XOSC_KHZ + 128) / 256) * PICO_XOSC_STARTUP_DELAY_MULTIPLIER) |
Functions | |
| void | xosc_init (void) |
| \end::reset_funcs[] | |
| void | pll_init (pll_hw_t *pll, uint refdiv, uint vco_freq, uint post_div1, uint post_div2) |
| \tag::pll_init_calculations[] | |
| bool | clock_configure (clock_num_t clk_index, uint32_t src, uint32_t auxsrc, uint32_t src_freq, uint32_t freq) |
| \tagclock_configure[] | |
| uint32_t | clock_get_hz (clock_num_t clk_index) |
| \endclock_configure[] | |
| bool | vsf_driver_init (void) |
| \endclock_get_hz[] | |
| #define KHZ 1000 |
| #define MHZ 1000000 |
| #define PICO_PLL_VCO_MIN_FREQ_KHZ (750 * KHZ) |
| #define PICO_PLL_VCO_MAX_FREQ_KHZ (1600 * KHZ) |
| #define PLL_COMMON_REFDIV 1 |
\tag::pll_settings[]
\end::pll_settings[]
| #define USB_CLK_KHZ 48000 |
| #define PLL_USB_REFDIV PLL_COMMON_REFDIV |
| #define PLL_USB_VCO_FREQ_KHZ (1200 * KHZ) |
| #define PLL_USB_POSTDIV1 5 |
| #define PLL_USB_POSTDIV2 5 |
| #define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 |
| #define STARTUP_DELAY (((XOSC_KHZ + 128) / 256) * PICO_XOSC_STARTUP_DELAY_MULTIPLIER) |
| void xosc_init | ( | void | ) |
\end::reset_funcs[]
\tag::pll_init_calculations[]
\end::pll_init_calculations[]
\tag::pll_init_finish[]
\end::pll_init_finish[]
| bool clock_configure | ( | clock_num_t | clk_index, |
| uint32_t | src, | ||
| uint32_t | auxsrc, | ||
| uint32_t | src_freq, | ||
| uint32_t | freq | ||
| ) |
\tagclock_configure[]
| uint32_t clock_get_hz | ( | clock_num_t | clk_index | ) |
\endclock_configure[]
\tagclock_get_hz[]
| bool vsf_driver_init | ( | void | ) |
\endclock_get_hz[]
common hal drivers
| none |
| true | initialization succeeded. |
| false | initialization failed |
\tagpll_init[]
\endpll_init[]
\tag::configure_clk_sys[]
\end::configure_clk_sys[]