5 years, 11 months ago.  This question has been closed. Reason: Duplicate question

Why does PwmOut sample program with LED1 not work on STM32-L432KC

I have a Nucleo STM32-L432KC board.

I'm trying to build the example PwmOut sketch on mbed.com:

[code] Gradually change the intensity of the LED.

  1. include "mbed.h"

PwmOut led(LED1);

int main() { while(1) { led = led + 0.01; wait(0.2); if(led >= 1.0) { led = 0; } } } [/code]

This program is from the help page of the PwmOut object. (The only thing I changed was the == 1.0 to >= 1.0) When I download this and flash it with openocd, the LED does not light up.

When I use a simple DigitalOut program, the LED does light up, so presumably the flashing works right.

Download command: [code]openocd -f ./stm32-nucleo-l432kc.cfg -c 'program Downloads/Nucleo_blink_led.NUCLEO_L432KC.bin 0x08000000 reset exit'[/code]

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32L432KCU6 microcontroller.

Hi Jon,

We're closing this posting as a duplicate of your question here:

We think Yoshi's comments were right on the mark.

Regards, Ralph, Team Mbed

posted by Ralph Fulchiero 23 Jan 2019