distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
STM32F4-RCC.cpp File Reference

Implementation of RCC-related functions for STM32F4. More...

#include "distortos/chip/STM32F4-RCC.hpp"
#include "distortos/chip/CMSIS-proxy.h"
#include "distortos/chip/STM32-bit-banding.h"
#include <array>
#include <cerrno>
Include dependency graph for STM32F4-RCC.cpp:

Namespaces

 distortos
 Top-level namespace of distortos project.
 
 distortos::chip
 Chip-related code of distortos project.
 

Functions

int distortos::chip::configureAhbClockDivider (uint16_t hpre)
 Configures divider of AHB clock (HPRE value). More...
 
int distortos::chip::configureApbClockDivider (bool ppre2, uint8_t ppre)
 Configures divider of APB1 or APB2 clock (PPRE1 or PPRE2 value). More...
 
void distortos::chip::configurePllClockSource (bool hse)
 Configures clock source of main and audio PLLs. More...
 
int distortos::chip::configurePllInputClockDivider (uint8_t pllm)
 Configures divider of PLL input clock (PLLM value) for main and audio PLLs. More...
 
void distortos::chip::disableHse ()
 Disables HSE clock. More...
 
void distortos::chip::disablePll ()
 Disables main PLL. More...
 
void distortos::chip::enableHse (bool bypass)
 Enables HSE clock. More...
 
int distortos::chip::enablePll (uint16_t plln, uint8_t pllp, uint8_t pllq)
 Enables main PLL. More...
 
void distortos::chip::switchSystemClock (SystemClockSource source)
 Switches system clock. More...
 

Detailed Description

Implementation of RCC-related functions for STM32F4.

Author
Copyright (C) 2015-2019 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.