Common CPU definitions for the STM32 family. More...
Common CPU definitions for the STM32 family.
Definition in file cpu_common.h.
#include <stdint.h>#include "cpu_conf.h"
Include dependency graph for cpu_common.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| #define | CPUID_LEN (12U) |
| Length of the CPU_ID in octets. More... | |
| #define | CPUID_ADDR (UID_BASE) |
| Starting address of the CPU ID. | |
| enum | bus_t { AHB , APB1 , APB2 , BUS_NUMOF } |
| CPU specific LSI clock speed. More... | |
| uint32_t | periph_apb_clk (bus_t bus) |
| Get the actual bus clock frequency for the APB buses. More... | |
| uint32_t | periph_timer_clk (bus_t bus) |
| Get the actual timer clock frequency. More... | |
| void | periph_clk_en (bus_t bus, uint32_t mask) |
| Enable the given peripheral clock. More... | |
| void | periph_clk_dis (bus_t bus, uint32_t mask) |
| Disable the given peripheral clock. More... | |
| void | periph_lpclk_en (bus_t bus, uint32_t mask) |
| Enable the given peripheral clock in low power mode. More... | |
| void | periph_lpclk_dis (bus_t bus, uint32_t mask) |
| Disable the given peripheral clock in low power mode. More... | |
| #define CPUID_LEN (12U) |
Length of the CPU_ID in octets.
This is the same for all members of the stm32 family
Definition at line 41 of file cpu_common.h.
| enum bus_t |
CPU specific LSI clock speed.
Available peripheral buses
| Enumerator | |
|---|---|
| AHB | Advanced High-performance Bus. |
| APB1 | Advanced Peripheral Bus 1 |
| APB2 | Advanced Peripheral Bus 2 |
| BUS_NUMOF | number of buses |
Definition at line 176 of file cpu_common.h.
| uint32_t periph_apb_clk | ( | bus_t | bus | ) |
Get the actual bus clock frequency for the APB buses.
| [in] | bus | target APBx bus |
| void periph_clk_dis | ( | bus_t | bus, |
| uint32_t | mask | ||
| ) |
Disable the given peripheral clock.
| [in] | bus | bus the peripheral is connected to |
| [in] | mask | bit in the RCC enable register |
| void periph_clk_en | ( | bus_t | bus, |
| uint32_t | mask | ||
| ) |
Enable the given peripheral clock.
| [in] | bus | bus the peripheral is connected to |
| [in] | mask | bit in the RCC enable register |
| void periph_lpclk_dis | ( | bus_t | bus, |
| uint32_t | mask | ||
| ) |
Disable the given peripheral clock in low power mode.
| [in] | bus | bus the peripheral is connected to |
| [in] | mask | bit in the RCC enable register |
| void periph_lpclk_en | ( | bus_t | bus, |
| uint32_t | mask | ||
| ) |
Enable the given peripheral clock in low power mode.
| [in] | bus | bus the peripheral is connected to |
| [in] | mask | bit in the RCC enable register |
| uint32_t periph_timer_clk | ( | bus_t | bus | ) |
Get the actual timer clock frequency.
| [in] | bus | corresponding APBx bus |