From 96172a1d0b671f323c2df81e14cffe852cf156b4 Mon Sep 17 00:00:00 2001 From: Galen Seitz Date: Tue, 9 Oct 2018 23:33:36 -0700 Subject: [PATCH] samples: basic: blink_led: Add support for nucleo_f302r8 Add support for the blink_led sample code using a PWM output from PA0 of the STM32F302R8. Signed-off-by: Galen Seitz --- samples/basic/blink_led/README.rst | 4 ++-- samples/basic/blink_led/sample.yaml | 4 ++-- samples/basic/blink_led/src/main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/basic/blink_led/README.rst b/samples/basic/blink_led/README.rst index fb169bd6058..3ff0c43b8fa 100644 --- a/samples/basic/blink_led/README.rst +++ b/samples/basic/blink_led/README.rst @@ -22,8 +22,8 @@ Arduino 101 and Quark D2000 CRB You will need to connect the LED to ground and PWM0 via the shield. You may need a current limiting resistor. See your LED datasheet. -Nucleo_F401RE, Nucleo_L476RG, and STM32F4_DISCOVERY -=================================================== +Nucleo_F401RE, Nucleo_L476RG, STM32F4_DISCOVERY, Nucleo_F302R8 +============================================================== Connect PWM2(PA0) to LED Nucleo_F103RB diff --git a/samples/basic/blink_led/sample.yaml b/samples/basic/blink_led/sample.yaml index 8234359f33e..53031ac43f7 100644 --- a/samples/basic/blink_led/sample.yaml +++ b/samples/basic/blink_led/sample.yaml @@ -4,7 +4,7 @@ tests: test: # FIXME: We should remove those and just rely on depends_on platform_whitelist: arduino_101 quark_d2000_crb - nucleo_f103rb nucleo_f401re nucleo_l476rg stm32f4_disco hexiwear_k64 - colibri_imx7d_m4 + nucleo_f103rb nucleo_f302r8 nucleo_f401re nucleo_l476rg stm32f4_disco + hexiwear_k64 colibri_imx7d_m4 tags: drivers pwm depends_on: pwm diff --git a/samples/basic/blink_led/src/main.c b/samples/basic/blink_led/src/main.c index 63c0a6f76d8..e5108b99bf9 100644 --- a/samples/basic/blink_led/src/main.c +++ b/samples/basic/blink_led/src/main.c @@ -18,7 +18,7 @@ #if defined(CONFIG_SOC_STM32F401XE) || defined(CONFIG_SOC_STM32F412ZG) || \ defined(CONFIG_SOC_STM32F413XH) || defined(CONFIG_SOC_STM32L476XG) || \ - defined(CONFIG_SOC_STM32F407XG) + defined(CONFIG_SOC_STM32F407XG) || defined(CONFIG_SOC_STM32F302X8) #define PWM_DRIVER CONFIG_PWM_STM32_2_DEV_NAME #define PWM_CHANNEL 1 #elif CONFIG_SOC_STM32F103XB