boards: arm: nucleo_g071rb enable PWM

Tested with tests/drivers/pwm/pwm_api/
(requires https://github.com/zephyrproject-rtos/zephyr/pull/27204)
and with oscillo.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
Alexandre Bourdiol 2020-07-31 16:36:46 +02:00 committed by Carles Cufí
parent b3188f1c32
commit 8098ecbc02
5 changed files with 17 additions and 0 deletions

View File

@ -98,6 +98,8 @@ The Zephyr nucleo_g071rb board configuration supports the following hardware fea
+-----------+------------+-------------------------------------+
| WATCHDOG | on-chip | independent watchdog |
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
Other hardware features are not yet supported in this Zephyr port.
@ -119,6 +121,7 @@ Default Zephyr Peripheral Mapping:
- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com)
- USER_PB : PC13
- LD4 : PA5
- PWM : PA6
For mode details please refer to `STM32 Nucleo-64 board User Manual`_.

View File

@ -50,3 +50,10 @@
&iwdg {
status = "okay";
};
&timers3 {
status = "okay";
pwm3: pwm {
status = "okay";
};
};

View File

@ -13,3 +13,4 @@ supported:
- uart
- gpio
- watchdog
- pwm

View File

@ -19,6 +19,9 @@ static const struct pin_config pinconf[] = {
{STM32_PIN_PA2, STM32G0_PINMUX_FUNC_PA2_USART2_TX},
{STM32_PIN_PA3, STM32G0_PINMUX_FUNC_PA3_USART2_RX},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) && CONFIG_SERIAL
{STM32_PIN_PA6, STM32G0_PINMUX_FUNC_PA6_PWM3_CH1},
#endif
};
static int pinmux_stm32_init(struct device *port)

View File

@ -28,4 +28,7 @@
#define STM32G0_PINMUX_FUNC_PA7_TIM3_CH2 \
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_NOPULL)
#define STM32G0_PINMUX_FUNC_PA6_PWM3_CH1 \
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_NOPULL)
#endif /* ZEPHYR_DRIVERS_PINMUX_STM32_PINMUX_STM32G0_H_ */