diff options
author | Elias Bakken <elias@iagent.no> | 2024-05-25 21:47:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-25 15:47:48 -0400 |
commit | 3078912f1d9e063906b9b40eda73d63065900212 (patch) | |
tree | 52eb7d930e09bd8976c525735ba23ed789440335 /src | |
parent | b6a0063235dd58bc9c1bb5767e87e09c9927f39a (diff) | |
download | kutter-3078912f1d9e063906b9b40eda73d63065900212.tar.gz kutter-3078912f1d9e063906b9b40eda73d63065900212.tar.xz kutter-3078912f1d9e063906b9b40eda73d63065900212.zip |
stm32: STM32F031 updates (#6607)
Add support for STM32F031x6 which is the 32 KB version of the STM32F031 MCU.
Add new I2C bus variant.
Signed-off by: Elias Bakken <elias@iagent.no>
Diffstat (limited to 'src')
-rw-r--r-- | src/stm32/Kconfig | 3 | ||||
-rw-r--r-- | src/stm32/stm32f0_i2c.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/stm32/Kconfig b/src/stm32/Kconfig index dbd6ff95..037e37bb 100644 --- a/src/stm32/Kconfig +++ b/src/stm32/Kconfig @@ -211,8 +211,7 @@ config CLOCK_FREQ config FLASH_SIZE hex - default 0x4000 if MACH_STM32F031 - default 0x8000 if MACH_STM32F042 + default 0x8000 if MACH_STM32F031 || MACH_STM32F042 default 0x20000 if MACH_STM32F070 || MACH_STM32F072 default 0x10000 if MACH_STM32F103 || MACH_STM32L412 # Flash size of stm32f103x8 (64KiB) default 0x40000 if MACH_STM32F2 || MACH_STM32F401 || MACH_STM32H723 diff --git a/src/stm32/stm32f0_i2c.c b/src/stm32/stm32f0_i2c.c index 1441079f..597b4846 100644 --- a/src/stm32/stm32f0_i2c.c +++ b/src/stm32/stm32f0_i2c.c @@ -22,6 +22,8 @@ struct i2c_info { DECL_CONSTANT_STR("BUS_PINS_i2c1_PF1_PF0", "PF1,PF0"); DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 2); DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9"); + DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB7", 3); + DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB7", "PB8,PB7"); // Deprecated "i2c1a" style mappings DECL_ENUMERATION("i2c_bus", "i2c1", 0); DECL_CONSTANT_STR("BUS_PINS_i2c1", "PB6,PB7"); @@ -93,6 +95,7 @@ static const struct i2c_info i2c_bus[] = { { I2C1, GPIO('B', 6), GPIO('B', 7), GPIO_FUNCTION(1) }, { I2C1, GPIO('F', 1), GPIO('F', 0), GPIO_FUNCTION(1) }, { I2C1, GPIO('B', 8), GPIO('B', 9), GPIO_FUNCTION(1) }, + { I2C1, GPIO('B', 8), GPIO('B', 7), GPIO_FUNCTION(1) }, #elif CONFIG_MACH_STM32F7 { I2C1, GPIO('B', 6), GPIO('B', 7), GPIO_FUNCTION(1) }, #elif CONFIG_MACH_STM32G0 |