9 years, 5 months ago.



I'm completely new to mbed. I have a good bit of programming experience, including using the Arduino IDE, but I'm having some issues with mbed on my F030R8 board using a simple DigitalOut code. When I try to blink D6 (PB_10) using the code below, it doesn't work when compiled for the F030R8 board. (And yes, the LED is attached properly, and I've already updated to the latest firmware on the board).


blink code

#include "mbed.h"

DigitalOut myled(D6);

int main() {
    while(1) {
        myled = 1; // LED is ON
        wait(2.5); // 200 ms
        myled = 0; // LED is OFF
        wait(2.5); // 1 sec

When I compile this same code for my F401RE board, it works just fine. Also, changing the pin to D7 seems to make it work on both boards. I have now tried it on 2 different F030R8 boards, and both behave the same way. I'm sure I'm doing something stupid, so I'd appreciate some help from the experts to get me going in the right direction.


Question relating to:

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

2 Answers

9 years, 5 months ago.

Have you try to remove mbed library and add it again?

9 years, 5 months ago.

Hello Agent Orange,

as I see it from sources,

    LED1        = PA_5,
    LED2        = PA_5,
    LED3        = PA_5,
    LED4        = PA_5,

Same is for 401 target. Replace D6 by LED1 and see if that works for both platforms.

0xc0170 LED is connected to PA_5.