libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Defined Constants and Types for the Clock Recovery System More...
Functions | |
void | crs_autotrim_usb_enable (void) |
This function enables automatic trimming of internal RC oscillator by USB SOF frames. More... | |
Defined Constants and Types for the Clock Recovery System
LGPL License Terms libopencm3 License
LGPL License Terms libopencm3 License
#define CRS CRS_BASE |
Definition at line 34 of file crs_common_all.h.
Definition at line 41 of file crs_common_all.h.
#define CRS_CFGR_FELIM (0xFF << CRS_CFGR_FELIM_SHIFT) |
Definition at line 84 of file crs_common_all.h.
#define CRS_CFGR_FELIM_SHIFT 16 |
Definition at line 83 of file crs_common_all.h.
#define CRS_CFGR_FELIM_VAL | ( | x | ) | ((x) << CRS_CFGR_FELIM_SHIFT) |
Definition at line 85 of file crs_common_all.h.
#define CRS_CFGR_RELOAD (0xFFFF << CRS_CFGR_RELOAD_SHIFT) |
Definition at line 88 of file crs_common_all.h.
#define CRS_CFGR_RELOAD_SHIFT 0 |
Definition at line 87 of file crs_common_all.h.
#define CRS_CFGR_RELOAD_VAL | ( | x | ) | ((x) << CRS_CFGR_RELOAD_SHIFT) |
Definition at line 89 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV (7 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 73 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_DIV128 (7 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 81 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_DIV16 (4 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 78 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_DIV2 (1 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 75 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_DIV32 (5 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 79 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_DIV4 (2 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 76 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_DIV64 (6 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 80 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_DIV8 (3 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 77 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_NODIV (0 << CRS_CFGR_SYNCDIV_SHIFT) |
Definition at line 74 of file crs_common_all.h.
#define CRS_CFGR_SYNCDIV_SHIFT 24 |
Definition at line 72 of file crs_common_all.h.
#define CRS_CFGR_SYNCPOL (1 << 31) |
Definition at line 64 of file crs_common_all.h.
#define CRS_CFGR_SYNCSRC (3 << CRS_CFGR_SYNCSRC_SHIFT) |
Definition at line 67 of file crs_common_all.h.
#define CRS_CFGR_SYNCSRC_GPIO (0 << CRS_CFGR_SYNCSRC_SHIFT) |
Definition at line 68 of file crs_common_all.h.
#define CRS_CFGR_SYNCSRC_LSE (1 << CRS_CFGR_SYNCSRC_SHIFT) |
Definition at line 69 of file crs_common_all.h.
#define CRS_CFGR_SYNCSRC_SHIFT 28 |
Definition at line 66 of file crs_common_all.h.
#define CRS_CFGR_SYNCSRC_USB_SOF (2 << CRS_CFGR_SYNCSRC_SHIFT) |
Definition at line 70 of file crs_common_all.h.
Definition at line 40 of file crs_common_all.h.
#define CRS_CR_AUTOTRIMEN (1 << 6) |
Definition at line 55 of file crs_common_all.h.
#define CRS_CR_CEN (1 << 5) |
Definition at line 56 of file crs_common_all.h.
#define CRS_CR_ERRIE (1 << 2) |
Definition at line 58 of file crs_common_all.h.
#define CRS_CR_ESYNCIE (1 << 3) |
Definition at line 57 of file crs_common_all.h.
#define CRS_CR_SWSYNC (1 << 7) |
Definition at line 54 of file crs_common_all.h.
#define CRS_CR_SYNCOKIE (1 << 0) |
Definition at line 60 of file crs_common_all.h.
#define CRS_CR_SYNCWARNIE (1 << 1) |
Definition at line 59 of file crs_common_all.h.
#define CRS_CR_TRIM (0x3F << CRS_CR_TRIM_SHIFT) |
Definition at line 52 of file crs_common_all.h.
#define CRS_CR_TRIM_SHIFT 8 |
Definition at line 51 of file crs_common_all.h.
Definition at line 43 of file crs_common_all.h.
#define CRS_ICR_ERRC (1 << 2) |
Definition at line 108 of file crs_common_all.h.
#define CRS_ICR_ESYNCC (1 << 3) |
Definition at line 107 of file crs_common_all.h.
#define CRS_ICR_SYNCOKC (1 << 0) |
Definition at line 110 of file crs_common_all.h.
#define CRS_ICR_SYNCWARNC (1 << 1) |
Definition at line 109 of file crs_common_all.h.
Definition at line 42 of file crs_common_all.h.
#define CRS_ISR_ERRF (1 << 2) |
Definition at line 101 of file crs_common_all.h.
#define CRS_ISR_ESYNCF (1 << 3) |
Definition at line 100 of file crs_common_all.h.
#define CRS_ISR_FECAP (0xFFFF << CRS_ISR_FECAP_SHIFT) |
Definition at line 94 of file crs_common_all.h.
#define CRS_ISR_FECAP_SHIFT 16 |
Definition at line 93 of file crs_common_all.h.
#define CRS_ISR_FEDIR (1 << 15) |
Definition at line 96 of file crs_common_all.h.
#define CRS_ISR_SYNCERR (1 << 8) |
Definition at line 99 of file crs_common_all.h.
#define CRS_ISR_SYNCMISS (1 << 9) |
Definition at line 98 of file crs_common_all.h.
#define CRS_ISR_SYNCOOKF (1 << 0) |
Definition at line 103 of file crs_common_all.h.
#define CRS_ISR_SYNCWARNF (1 << 1) |
Definition at line 102 of file crs_common_all.h.
#define CRS_ISR_TRIMOVF (1 << 10) |
Definition at line 97 of file crs_common_all.h.
void crs_autotrim_usb_enable | ( | void | ) |
This function enables automatic trimming of internal RC oscillator by USB SOF frames.
Definition at line 39 of file crs_common_all.c.
References CRS_CFGR, CRS_CFGR_SYNCSRC_USB_SOF, CRS_CR, CRS_CR_AUTOTRIMEN, CRS_CR_CEN, RCC_CRS, and rcc_periph_clock_enable().