libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
crs_common_all.c
Go to the documentation of this file.
1/** @addtogroup crs_file CRS peripheral API
2 * @ingroup peripheral_apis
3 *
4 * @brief <b>(USB) STM32 Clock Recovery Subsystem</b>
5 *
6 * @version 1.0.0
7 *
8 * @date 5 Feb 2014
9 *
10 * LGPL License Terms @ref lgpl_license
11 */
12
13/*
14 * This file is part of the libopencm3 project.
15 *
16 * This library is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU Lesser General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public License
27 * along with this library. If not, see <http://www.gnu.org/licenses/>.
28 */
29/**@{*/
30
31
34
35/**
36 * This function enables automatic trimming of internal RC oscillator by USB SOF
37 * frames
38 */
40{
42
43 CRS_CFGR &= ~CRS_CFGR_SYNCSRC;
45
48}
49
50/**@}*/
#define CRS_CFGR
#define CRS_CR
#define CRS_CR_CEN
#define CRS_CFGR_SYNCSRC_USB_SOF
#define CRS_CR_AUTOTRIMEN
void crs_autotrim_usb_enable(void)
This function enables automatic trimming of internal RC oscillator by USB SOF frames.
void rcc_periph_clock_enable(enum rcc_periph_clken clken)
Enable Peripheral Clock in running mode.
@ RCC_CRS
Definition: l4/rcc.h:820