boards: Set nucleo_f429zi compatible with configuration guidelines
According to Default Configuration Guidelines, update nucleo_f429zi - Add SPI_1, pinmux compatible with arduino spi - Change PWM from PA0 to PE13 (Arduino D3) - Disable I2C by default - Update board dts with arduino connectors - update board yaml file - update board documentation Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
deb0941cd5
commit
2a490fd030
|
@ -27,6 +27,13 @@ config ETH_STM32_HAL
|
||||||
|
|
||||||
endif # NETWORKING
|
endif # NETWORKING
|
||||||
|
|
||||||
|
if SERIAL
|
||||||
|
|
||||||
|
config UART_STM32_PORT_6
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # SERIAL
|
||||||
|
|
||||||
if I2C
|
if I2C
|
||||||
|
|
||||||
config I2C_1
|
config I2C_1
|
||||||
|
@ -34,4 +41,18 @@ config I2C_1
|
||||||
|
|
||||||
endif # I2C
|
endif # I2C
|
||||||
|
|
||||||
|
if SPI
|
||||||
|
|
||||||
|
config SPI_1
|
||||||
|
def_bool y
|
||||||
|
|
||||||
|
endif # SPI
|
||||||
|
|
||||||
|
if PWM
|
||||||
|
|
||||||
|
config PWM_STM32_1
|
||||||
|
def_bool y
|
||||||
|
|
||||||
|
endif # PWM
|
||||||
|
|
||||||
endif # BOARD_NUCLEO_F429ZI
|
endif # BOARD_NUCLEO_F429ZI
|
||||||
|
|
|
@ -99,7 +99,8 @@ The Zephyr nucleo_f249zi board configuration supports the following hardware fea
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| I2C | on-chip | i2c |
|
| I2C | on-chip | i2c |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
|
| SPI | on-chip | spi |
|
||||||
|
+-----------+------------+-------------------------------------+
|
||||||
|
|
||||||
Other hardware features are not yet supported on this Zephyr port.
|
Other hardware features are not yet supported on this Zephyr port.
|
||||||
|
|
||||||
|
@ -141,11 +142,15 @@ For mode details please refer to `STM32 Nucleo-144 board User Manual`_.
|
||||||
Default Zephyr Peripheral Mapping:
|
Default Zephyr Peripheral Mapping:
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
- UART_3_TX : PD8
|
The Nucleo F429ZI board features a ST Zio connector (extended Arduino Uno V3)
|
||||||
- UART_3_RX : PD9
|
and a ST morpho connector. Board is configured as follows
|
||||||
- PWM_2_CH1 : PA0
|
|
||||||
- I2C1_SCL : PB8
|
- UART_3 TX/RX : PD8/PD9 (ST-Link Virtual Port Com)
|
||||||
- I2C1_SDA : PB9
|
- UART_6 TX/RX : PG14/PG9 (Arduino Serial)
|
||||||
|
- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
|
||||||
|
- SPI1 NSS/SCK/MISO/MOSI : PA4/PA5/PA6/PA7 (Arduino SPI)
|
||||||
|
- PWM_2_CH1 : PE13
|
||||||
|
- ETH : PA1, PA2, PA7, PB13, PC1, PC4, PC5, PG11, PG13
|
||||||
- USER_PB : PC13
|
- USER_PB : PC13
|
||||||
- LD1 : PB0
|
- LD1 : PB0
|
||||||
- LD2 : PB7
|
- LD2 : PB7
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
zephyr,console = &usart3;
|
zephyr,console = &usart3;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,ccm = &ccm0;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -49,17 +50,31 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
arduino_i2c: &i2c1 {};
|
||||||
|
arduino_spi: &spi1 {};
|
||||||
|
arduino_serial: &usart6 {};
|
||||||
|
|
||||||
&i2c1 {
|
&i2c1 {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
clock-frequency = <I2C_BITRATE_FAST>;
|
clock-frequency = <I2C_BITRATE_FAST>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&usart3 {
|
&usart3 {
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
pinctrl-0 = <&usart3_pins_b>;
|
pinctrl-0 = <&usart3_pins_b>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
status = "ok";
|
status = "ok";
|
||||||
};
|
};
|
||||||
|
&usart6 {
|
||||||
|
current-speed = <115200>;
|
||||||
|
pinctrl-0 = <&usart6_pins_a>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&timers2 {
|
&timers2 {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
|
|
|
@ -5,5 +5,11 @@ arch: arm
|
||||||
toolchain:
|
toolchain:
|
||||||
- zephyr
|
- zephyr
|
||||||
- gccarmemb
|
- gccarmemb
|
||||||
|
ram: 256
|
||||||
|
flash: 2048
|
||||||
supported:
|
supported:
|
||||||
|
- netif:eth
|
||||||
|
- i2c
|
||||||
|
- spi
|
||||||
|
- gpio
|
||||||
- pwm
|
- pwm
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
CONFIG_ARM=y
|
CONFIG_ARM=y
|
||||||
CONFIG_BOARD_NUCLEO_F429ZI=y
|
|
||||||
CONFIG_SOC_SERIES_STM32F4X=y
|
CONFIG_SOC_SERIES_STM32F4X=y
|
||||||
CONFIG_SOC_STM32F429XI=y
|
CONFIG_SOC_STM32F429XI=y
|
||||||
# 180MHz system clock
|
# 180MHz system clock
|
||||||
|
@ -21,9 +20,6 @@ CONFIG_PINMUX=y
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# enable I2C
|
|
||||||
CONFIG_I2C=y
|
|
||||||
|
|
||||||
# clock configuration
|
# clock configuration
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,13 @@ static const struct pin_config pinconf[] = {
|
||||||
#ifdef CONFIG_UART_STM32_PORT_3
|
#ifdef CONFIG_UART_STM32_PORT_3
|
||||||
{STM32_PIN_PD8, STM32F4_PINMUX_FUNC_PD8_USART3_TX},
|
{STM32_PIN_PD8, STM32F4_PINMUX_FUNC_PD8_USART3_TX},
|
||||||
{STM32_PIN_PD9, STM32F4_PINMUX_FUNC_PD9_USART3_RX},
|
{STM32_PIN_PD9, STM32F4_PINMUX_FUNC_PD9_USART3_RX},
|
||||||
#endif /* #ifdef CONFIG_UART_STM32_PORT_3 */
|
#endif /* CONFIG_UART_STM32_PORT_3 */
|
||||||
#ifdef CONFIG_PWM_STM32_2
|
#ifdef CONFIG_UART_STM32_PORT_6
|
||||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
{STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX},
|
||||||
|
{STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX},
|
||||||
|
#endif /* CONFIG_UART_STM32_PORT_6 */
|
||||||
|
#ifdef CONFIG_PWM_STM32_1
|
||||||
|
{STM32_PIN_PE13, STM32F4_PINMUX_FUNC_PE13_PWM1_CH3},
|
||||||
#endif /* CONFIG_PWM_STM32_2 */
|
#endif /* CONFIG_PWM_STM32_2 */
|
||||||
#ifdef CONFIG_ETH_STM32_HAL
|
#ifdef CONFIG_ETH_STM32_HAL
|
||||||
{STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_ETH},
|
{STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_ETH},
|
||||||
|
@ -38,6 +42,12 @@ static const struct pin_config pinconf[] = {
|
||||||
{STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL},
|
{STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL},
|
||||||
{STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA},
|
{STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA},
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_SPI_1
|
||||||
|
{STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS},
|
||||||
|
{STM32_PIN_PA5, STM32F4_PINMUX_FUNC_PA5_SPI1_SCK},
|
||||||
|
{STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO},
|
||||||
|
{STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI},
|
||||||
|
#endif /* CONFIG_SPI_1 */
|
||||||
};
|
};
|
||||||
|
|
||||||
static int pinmux_stm32_init(struct device *port)
|
static int pinmux_stm32_init(struct device *port)
|
||||||
|
|
|
@ -285,6 +285,8 @@
|
||||||
|
|
||||||
#define STM32F4_PINMUX_FUNC_PE8_UART7_TX \
|
#define STM32F4_PINMUX_FUNC_PE8_UART7_TX \
|
||||||
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
|
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
|
||||||
|
#define STM32F4_PINMUX_FUNC_PE13_PWM1_CH3 \
|
||||||
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_PULLUP)
|
||||||
|
|
||||||
/* Port F */
|
/* Port F */
|
||||||
#define STM32F4_PINMUX_FUNC_PF0_I2C2_SDA \
|
#define STM32F4_PINMUX_FUNC_PF0_I2C2_SDA \
|
||||||
|
|
Loading…
Reference in a new issue