Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
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.
- 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]
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