boards: stm32l496g_disco: Conform to default configuration guidelines
Update stm32l496g_disco configuration to match with default configuration guidelines: -Deactivate features by default -Configure available connectors Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
01a0b50c94
commit
b3645eb62b
8 changed files with 79 additions and 7 deletions
|
@ -18,6 +18,30 @@ config UART_STM32_PORT_2
|
||||||
|
|
||||||
endif # UART_CONSOLE
|
endif # UART_CONSOLE
|
||||||
|
|
||||||
|
if SERIAL
|
||||||
|
|
||||||
|
config UART_STM32_LPUART_1
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # SERIAL
|
||||||
|
|
||||||
|
if I2C
|
||||||
|
|
||||||
|
config I2C_1
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # I2C
|
||||||
|
|
||||||
|
if SPI
|
||||||
|
|
||||||
|
config SPI_STM32_INTERRUPT
|
||||||
|
default y
|
||||||
|
|
||||||
|
config SPI_1
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # SPI
|
||||||
|
|
||||||
if PWM
|
if PWM
|
||||||
|
|
||||||
config PWM_STM32_2
|
config PWM_STM32_2
|
||||||
|
|
|
@ -139,6 +139,8 @@ The Zephyr stm32l496g_disco board configuration supports the following hardware
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| I2C | on-chip | i2c |
|
| I2C | on-chip | i2c |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
|
| SPI | on-chip | spi |
|
||||||
|
+-----------+------------+-------------------------------------+
|
||||||
| PWM | on-chip | pwm |
|
| PWM | on-chip | pwm |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
|
|
||||||
|
@ -160,10 +162,11 @@ For mode details please refer to `STM32L496G Discovery board User Manual`_.
|
||||||
Default Zephyr Peripheral Mapping:
|
Default Zephyr Peripheral Mapping:
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
- UART_1_TX : PB6
|
- UART_1 TX/RX : PB6/PG10
|
||||||
- UART_1_RX : PG10
|
- UART_2 TX/RX : PA2/PD6 (ST-Link Virtual Port Com)
|
||||||
- UART_2_TX : PA2
|
- LPUART_1 TX/RX : PG7/PG8 (Arduino Serial)
|
||||||
- UART_2_RX : PD6
|
- I2C1 SCL/SDA : PB8/PB7 (Arduino I2C)
|
||||||
|
- SPI1 SCK/MISO/MOSI : PA5/PB4/PB5 (Arduino SPI)
|
||||||
- I2C_1_SCL : PB8
|
- I2C_1_SCL : PB8
|
||||||
- I2C_1_SDA : PB7
|
- I2C_1_SDA : PB7
|
||||||
- PWM_2_CH1 : PA0
|
- PWM_2_CH1 : PA0
|
||||||
|
|
|
@ -23,10 +23,19 @@ static const struct pin_config pinconf[] = {
|
||||||
{STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX},
|
{STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX},
|
||||||
{STM32_PIN_PD6, STM32L4X_PINMUX_FUNC_PD6_USART2_RX},
|
{STM32_PIN_PD6, STM32L4X_PINMUX_FUNC_PD6_USART2_RX},
|
||||||
#endif /* CONFIG_UART_STM32_PORT_2 */
|
#endif /* CONFIG_UART_STM32_PORT_2 */
|
||||||
|
#ifdef CONFIG_UART_STM32_LPUART_1
|
||||||
|
{STM32_PIN_PG7, STM32L4X_PINMUX_FUNC_PG7_LPUART1_TX},
|
||||||
|
{STM32_PIN_PG8, STM32L4X_PINMUX_FUNC_PG8_LPUART1_RX},
|
||||||
|
#endif /* CONFIG_UART_STM32_LPUART_1 */
|
||||||
#ifdef CONFIG_I2C_1
|
#ifdef CONFIG_I2C_1
|
||||||
{STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL},
|
{STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL},
|
||||||
{STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA},
|
{STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA},
|
||||||
#endif /* CONFIG_I2C_1 */
|
#endif /* CONFIG_I2C_1 */
|
||||||
|
#ifdef CONFIG_SPI_1
|
||||||
|
{STM32_PIN_PA5, STM32L4X_PINMUX_FUNC_PA5_SPI1_SCK},
|
||||||
|
{STM32_PIN_PB4, STM32L4X_PINMUX_FUNC_PB4_SPI1_MISO},
|
||||||
|
{STM32_PIN_PB5, STM32L4X_PINMUX_FUNC_PB5_SPI1_MOSI},
|
||||||
|
#endif /* CONFIG_SPI_1 */
|
||||||
#ifdef CONFIG_PWM_STM32_2
|
#ifdef CONFIG_PWM_STM32_2
|
||||||
{STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1},
|
{STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||||
#endif /* CONFIG_PWM_STM32_2 */
|
#endif /* CONFIG_PWM_STM32_2 */
|
||||||
|
|
|
@ -55,6 +55,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
arduino_i2c: &i2c1 {};
|
||||||
|
arduino_spi: &spi1 {};
|
||||||
|
arduino_serial: &lpuart1 {};
|
||||||
|
|
||||||
&usart1 {
|
&usart1 {
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
pinctrl-0 = <&usart1_pins_c>;
|
pinctrl-0 = <&usart1_pins_c>;
|
||||||
|
@ -69,6 +73,13 @@
|
||||||
status = "ok";
|
status = "ok";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&lpuart1 {
|
||||||
|
current-speed = <115200>;
|
||||||
|
pinctrl-0 = <&usart1_pins_c>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&timers2 {
|
&timers2 {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
|
|
||||||
|
@ -77,6 +88,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&i2c1 {
|
||||||
|
status = "ok";
|
||||||
|
clock-frequency = <I2C_BITRATE_FAST>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,5 +5,10 @@ arch: arm
|
||||||
toolchain:
|
toolchain:
|
||||||
- zephyr
|
- zephyr
|
||||||
- gnuarmemb
|
- gnuarmemb
|
||||||
|
ram: 320
|
||||||
|
flash: 1024
|
||||||
supported:
|
supported:
|
||||||
- pwm
|
- pwm
|
||||||
|
- i2c
|
||||||
|
- spi
|
||||||
|
- gpio
|
||||||
|
|
|
@ -34,6 +34,3 @@ CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
||||||
# console
|
# console
|
||||||
CONFIG_CONSOLE=y
|
CONFIG_CONSOLE=y
|
||||||
CONFIG_UART_CONSOLE=y
|
CONFIG_UART_CONSOLE=y
|
||||||
|
|
||||||
#enable pwm
|
|
||||||
CONFIG_PWM=y
|
|
||||||
|
|
|
@ -55,8 +55,12 @@
|
||||||
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
||||||
#define STM32L4X_PINMUX_FUNC_PB3_SPI3_SCK \
|
#define STM32L4X_PINMUX_FUNC_PB3_SPI3_SCK \
|
||||||
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
|
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
|
||||||
|
#define STM32L4X_PINMUX_FUNC_PB4_SPI1_MISO \
|
||||||
|
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
||||||
#define STM32L4X_PINMUX_FUNC_PB4_SPI3_MISO \
|
#define STM32L4X_PINMUX_FUNC_PB4_SPI3_MISO \
|
||||||
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
|
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
|
||||||
|
#define STM32L4X_PINMUX_FUNC_PB5_SPI1_MOSI \
|
||||||
|
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
||||||
#define STM32L4X_PINMUX_FUNC_PB5_SPI3_MOSI \
|
#define STM32L4X_PINMUX_FUNC_PB5_SPI3_MOSI \
|
||||||
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
|
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
|
||||||
#define STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL \
|
#define STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL \
|
||||||
|
@ -127,6 +131,10 @@
|
||||||
/* Port G */
|
/* Port G */
|
||||||
#define STM32L4X_PINMUX_FUNC_PG7_I2C3_SCL \
|
#define STM32L4X_PINMUX_FUNC_PG7_I2C3_SCL \
|
||||||
(STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
(STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
||||||
|
#define STM32L4X_PINMUX_FUNC_PG7_LPUART1_TX \
|
||||||
|
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
|
||||||
|
#define STM32L4X_PINMUX_FUNC_PG8_LPUART1_RX \
|
||||||
|
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUPDR_NO_PULL)
|
||||||
#define STM32L4X_PINMUX_FUNC_PG8_I2C3_SDA \
|
#define STM32L4X_PINMUX_FUNC_PG8_I2C3_SDA \
|
||||||
(STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
(STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
||||||
#define STM32L4X_PINMUX_FUNC_PG9_USART1_TX \
|
#define STM32L4X_PINMUX_FUNC_PG9_USART1_TX \
|
||||||
|
|
|
@ -63,6 +63,12 @@
|
||||||
tx = <STM32_PIN_PA0 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
tx = <STM32_PIN_PA0 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
lpuart1_pins_a: lpuart1_a {
|
||||||
|
rx_tx {
|
||||||
|
rx = <STM32_PIN_PG8 (STM32_PINMUX_ALT_FUNC_8 | STM32_PUPDR_NO_PULL)>;
|
||||||
|
tx = <STM32_PIN_PG7 (STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
can_pins_a: can_a {
|
can_pins_a: can_a {
|
||||||
rx_tx {
|
rx_tx {
|
||||||
rx = <STM32_PIN_PA11 (STM32_PINMUX_ALT_FUNC_9 | STM32_PUPDR_PULL_UP)>;
|
rx = <STM32_PIN_PA11 (STM32_PINMUX_ALT_FUNC_9 | STM32_PUPDR_PULL_UP)>;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue