From bb52575d452fd5d1589f2bb681251db0e5b6bb0f Mon Sep 17 00:00:00 2001 From: Vincent Dupont Date: Thu, 16 Mar 2017 16:44:27 +0100 Subject: [PATCH] boards: fix I2C_APBCLK value in stm32-based boards --- boards/fox/include/periph_conf.h | 2 +- boards/iotlab-common/include/periph_conf_common.h | 2 +- boards/limifrog-v1/include/periph_conf.h | 2 +- boards/maple-mini/include/periph_conf.h | 2 +- boards/msbiot/include/periph_conf.h | 2 +- boards/nucleo-f103/include/periph_conf.h | 2 +- boards/nucleo-f303/include/periph_conf.h | 2 +- boards/nucleo-f401/include/periph_conf.h | 2 +- boards/nucleo-f410/include/periph_conf.h | 2 +- boards/nucleo-f411/include/periph_conf.h | 2 +- boards/nucleo-f446/include/periph_conf.h | 2 +- boards/nucleo-l1/include/periph_conf.h | 2 +- boards/nucleo144-f413/include/periph_conf.h | 2 +- boards/stm32f3discovery/include/periph_conf.h | 2 +- boards/stm32f4discovery/include/periph_conf.h | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/boards/fox/include/periph_conf.h b/boards/fox/include/periph_conf.h index 3da99e4420..65c3e24613 100644 --- a/boards/fox/include/periph_conf.h +++ b/boards/fox/include/periph_conf.h @@ -175,7 +175,7 @@ static const spi_conf_t spi_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (36000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/iotlab-common/include/periph_conf_common.h b/boards/iotlab-common/include/periph_conf_common.h index b0d104c970..fa32e90ba7 100644 --- a/boards/iotlab-common/include/periph_conf_common.h +++ b/boards/iotlab-common/include/periph_conf_common.h @@ -144,7 +144,7 @@ static const uart_conf_t uart_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (36000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/limifrog-v1/include/periph_conf.h b/boards/limifrog-v1/include/periph_conf.h index 6bf9eb2981..0762a4b847 100644 --- a/boards/limifrog-v1/include/periph_conf.h +++ b/boards/limifrog-v1/include/periph_conf.h @@ -166,7 +166,7 @@ static const spi_conf_t spi_config[] = { #define I2C_1_EN 1 #define I2C_NUMOF (I2C_0_EN + I2C_1_EN) #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (36000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_EVT_ISR isr_i2c1_ev diff --git a/boards/maple-mini/include/periph_conf.h b/boards/maple-mini/include/periph_conf.h index ee3d650fe6..9cd4ecd764 100644 --- a/boards/maple-mini/include/periph_conf.h +++ b/boards/maple-mini/include/periph_conf.h @@ -136,7 +136,7 @@ static const uart_conf_t uart_config[] = { #define I2C_0_EN 1 #define I2C_1_EN 0 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (36000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/msbiot/include/periph_conf.h b/boards/msbiot/include/periph_conf.h index db29cb2d6d..2dda1f35af 100644 --- a/boards/msbiot/include/periph_conf.h +++ b/boards/msbiot/include/periph_conf.h @@ -233,7 +233,7 @@ static const spi_conf_t spi_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (42000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/nucleo-f103/include/periph_conf.h b/boards/nucleo-f103/include/periph_conf.h index b36481b2f3..a8b9ad5b1d 100644 --- a/boards/nucleo-f103/include/periph_conf.h +++ b/boards/nucleo-f103/include/periph_conf.h @@ -132,7 +132,7 @@ static const uart_conf_t uart_config[] = { #define I2C_0_EN 1 #define I2C_1_EN 0 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (36000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/nucleo-f303/include/periph_conf.h b/boards/nucleo-f303/include/periph_conf.h index 8e4a89a29b..dcb3ba81ee 100755 --- a/boards/nucleo-f303/include/periph_conf.h +++ b/boards/nucleo-f303/include/periph_conf.h @@ -195,7 +195,7 @@ static const spi_conf_t spi_config[] = { #define I2C_0_EN 1 #define I2C_1_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (36000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/nucleo-f401/include/periph_conf.h b/boards/nucleo-f401/include/periph_conf.h index 444fab10e0..a9b5430016 100644 --- a/boards/nucleo-f401/include/periph_conf.h +++ b/boards/nucleo-f401/include/periph_conf.h @@ -208,7 +208,7 @@ static const spi_conf_t spi_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (42000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/nucleo-f410/include/periph_conf.h b/boards/nucleo-f410/include/periph_conf.h index 35d58f445a..f42e3084d9 100644 --- a/boards/nucleo-f410/include/periph_conf.h +++ b/boards/nucleo-f410/include/periph_conf.h @@ -159,7 +159,7 @@ static const spi_conf_t spi_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (42000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/nucleo-f411/include/periph_conf.h b/boards/nucleo-f411/include/periph_conf.h index f5681a534f..69934cc724 100644 --- a/boards/nucleo-f411/include/periph_conf.h +++ b/boards/nucleo-f411/include/periph_conf.h @@ -205,7 +205,7 @@ static const spi_conf_t spi_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (42000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/nucleo-f446/include/periph_conf.h b/boards/nucleo-f446/include/periph_conf.h index 2cdf10bce9..1f44c716bd 100644 --- a/boards/nucleo-f446/include/periph_conf.h +++ b/boards/nucleo-f446/include/periph_conf.h @@ -234,7 +234,7 @@ static const spi_conf_t spi_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (42000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/nucleo-l1/include/periph_conf.h b/boards/nucleo-l1/include/periph_conf.h index 9a385f34eb..c74b43ecb1 100644 --- a/boards/nucleo-l1/include/periph_conf.h +++ b/boards/nucleo-l1/include/periph_conf.h @@ -204,7 +204,7 @@ static const spi_conf_t spi_config[] = { #define I2C_1_EN 1 #define I2C_NUMOF (I2C_0_EN + I2C_1_EN) #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (36000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_EVT_ISR isr_i2c1_ev diff --git a/boards/nucleo144-f413/include/periph_conf.h b/boards/nucleo144-f413/include/periph_conf.h index 5a475031e4..a47fb1d92e 100644 --- a/boards/nucleo144-f413/include/periph_conf.h +++ b/boards/nucleo144-f413/include/periph_conf.h @@ -218,7 +218,7 @@ static const spi_conf_t spi_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (42000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/stm32f3discovery/include/periph_conf.h b/boards/stm32f3discovery/include/periph_conf.h index c095d8c48c..75a42f86a2 100644 --- a/boards/stm32f3discovery/include/periph_conf.h +++ b/boards/stm32f3discovery/include/periph_conf.h @@ -204,7 +204,7 @@ static const spi_conf_t spi_config[] = { #define I2C_0_EN 1 #define I2C_1_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (36000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1 diff --git a/boards/stm32f4discovery/include/periph_conf.h b/boards/stm32f4discovery/include/periph_conf.h index 18af0c2345..e377a77fa9 100644 --- a/boards/stm32f4discovery/include/periph_conf.h +++ b/boards/stm32f4discovery/include/periph_conf.h @@ -238,7 +238,7 @@ static const spi_conf_t spi_config[] = { #define I2C_NUMOF (1U) #define I2C_0_EN 1 #define I2C_IRQ_PRIO 1 -#define I2C_APBCLK (42000000U) +#define I2C_APBCLK (CLOCK_APB1) /* I2C 0 device configuration */ #define I2C_0_DEV I2C1