mirror of
https://github.com/gosticks/RIOT.git
synced 2025-10-16 12:05:37 +00:00
boards/stm32-based: added missing CLOCK_APBx defines
This commit is contained in:
parent
7979c3ac5c
commit
1bc1dd94ba
@ -40,11 +40,13 @@ extern "C" {
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1 /* AHB clock -> 72MHz */
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1 /* APB2 clock -> 72MHz */
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2 /* APB1 clock -> 36MHz */
|
||||
/* resulting bus clocks */
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK)
|
||||
/* configuration of flash access cycles */
|
||||
#define CLOCK_FLASH_LATENCY FLASH_ACR_LATENCY_2
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -42,6 +42,11 @@ extern "C" {
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV1 /* APB1 clock -> 32MHz */
|
||||
/* configuration of flash access cycles */
|
||||
#define CLOCK_FLASH_LATENCY FLASH_ACR_LATENCY
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -34,6 +34,11 @@ extern "C" {
|
||||
|
||||
/* the actual PLL values are automatically generated */
|
||||
#define CLOCK_PLL_MUL (CLOCK_CORECLOCK / CLOCK_HSE)
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -34,6 +34,11 @@ extern "C" {
|
||||
|
||||
/* the actual PLL values are automatically generated */
|
||||
#define CLOCK_PLL_MUL (CLOCK_CORECLOCK / CLOCK_HSE)
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -33,6 +33,11 @@ extern "C" {
|
||||
|
||||
/* the actual PLL values are automatically generated */
|
||||
#define CLOCK_PLL_MUL (CLOCK_CORECLOCK / CLOCK_HSE)
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -34,6 +34,11 @@ extern "C" {
|
||||
|
||||
/* the actual PLL values are automatically generated */
|
||||
#define CLOCK_PLL_MUL (CLOCK_CORECLOCK / CLOCK_HSE)
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -31,22 +31,20 @@ extern "C" {
|
||||
*/
|
||||
#define CLOCK_HSE (8000000U) /* external oscillator */
|
||||
#define CLOCK_CORECLOCK (72000000U) /* desired core clock frequency */
|
||||
|
||||
/* the actual PLL values are automatically generated */
|
||||
#define CLOCK_PLL_DIV (1)
|
||||
#define CLOCK_PLL_MUL (9)
|
||||
|
||||
/* AHB, APB1, APB2 dividers */
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2 /* max 36 MHz (!) */
|
||||
|
||||
/* resulting bus clocks */
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK)
|
||||
|
||||
/* Flash latency */
|
||||
#define CLOCK_FLASH_LATENCY FLASH_ACR_LATENCY_2 /* for >= 72 MHz */
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -38,6 +38,11 @@ extern "C" {
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2
|
||||
#define CLOCK_FLASH_LATENCY FLASH_ACR_LATENCY_1
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -37,6 +37,11 @@ extern "C" {
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2
|
||||
#define CLOCK_FLASH_LATENCY FLASH_ACR_LATENCY_1
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -41,6 +41,11 @@ extern "C" {
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV1 /* APB1 clock -> 32MHz */
|
||||
/* configuration of flash access cycles */
|
||||
#define CLOCK_FLASH_LATENCY FLASH_ACR_LATENCY
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -34,6 +34,11 @@ extern "C" {
|
||||
|
||||
/* the actual PLL values are automatically generated */
|
||||
#define CLOCK_PLL_MUL (CLOCK_CORECLOCK / CLOCK_HSE)
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
@ -36,6 +36,11 @@ extern "C" {
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2
|
||||
#define CLOCK_FLASH_LATENCY FLASH_ACR_LATENCY_2
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user