NUCLEO-L432KC unable to blink LED

Hello, I’ve gotten mbed-cli running and can compile and upload a project. Unfortunately the LED doesn’t blink when uploading a blink program. I don’t have a lot more than that. Every step works except the hardware.

#include "mbed.h"
DigitalOut led(LED1);
int main() {
        while (1) {
                led = 1;
                wait(0.2);
                led = 0;
                wait(0.2);
        }
}

Hey Sid,

Can you monitor the output of the processor pin you expect to be blinking? It’ll be worth checking exactly which processor pin is defined as LED1 in the target’s pin definitions and then checking with a multimeter or similar if you have one to hand.

As an aside, which version of Mbed OS are you using? It won’t be the cause of your issue but the wait() function is deprecated. You can use ThisThread::sleep_for() if you’re using the RTOS, or wait_us() if not.

The pin is D13 per the manual. There is no voltage on the pin despite turning it on. Manual should be at https://www.st.com/content/ccc/resource/technical/document/user_manual/e3/0e/88/05/e8/74/43/a0/DM00231744.pdf/files/DM00231744.pdf/jcr:content/translations/en.DM00231744.pdf. ST-Link light is green.

Thanks, I’ve switched to ThisThread::sleep_for.

Issue was an old firmware version on the ST-Link.