Skip to content
Permalink
Browse files

boards: stm32f429_disc1: add i2c

Add I2C_1, I2C_2, I2C_3 devices.
I2C_3: Enabled by default (STMPE811 touch)

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
  • Loading branch information...
pavlohamov authored and MaureenHelm committed Jul 28, 2019
1 parent 7de2f4d commit e806bd977955e4e044e97b1abbc933393479ac05
@@ -17,4 +17,11 @@ config UART_1

endif # UART_CONSOLE

if I2C

config I2C_3
default y

endif # I2C

endif # BOARD_STM32F429I_DISC1
@@ -93,6 +93,8 @@ The Zephyr stm32f429i_disc1 board configuration supports the following hardware
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+

Other hardware features are not yet supported on Zephyr porting.

@@ -118,6 +120,12 @@ Default Zephyr Peripheral Mapping:
- USER_PB : PA0
- LD3 : PG13
- LD4 : PG12
- I2C_1_SCL : PB8
- I2C_1_SDA : PB9
- I2C_2_SCL : PB10
- I2C_2_SDA : PB11
- I2C_3_SCL : PA8
- I2C_3_SDA : PC9

System Clock
============
@@ -22,6 +22,18 @@ static const struct pin_config pinconf[] = {
{STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX},
{STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX},
#endif /* CONFIG_UART_2 */
#ifdef CONFIG_I2C_1
{STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL},
{STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA},
#endif /* CONFIG_I2C_1 */
#ifdef CONFIG_I2C_2
{STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL},
{STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_I2C2_SDA},
#endif /* CONFIG_I2C_2 */
#ifdef CONFIG_I2C_3
{STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL},
{STM32_PIN_PC9, STM32F4_PINMUX_FUNC_PC9_I2C3_SDA},
#endif /* CONFIG_I2C_3 */
};

static int pinmux_stm32_init(struct device *port)
@@ -62,3 +62,8 @@
&rtc {
status = "okay";
};

&i2c3 {
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};
@@ -11,3 +11,4 @@ flash: 2048
supported:
- rtc
- counter
- i2c

0 comments on commit e806bd9

Please sign in to comment.
You can’t perform that action at this time.