STM32CUBEMX : LED is not blinking on a breadboard

I started with cubemx that generates code on keil for a couple of months ago.
My goal is to blink a led on a breadbord. unfortunately when I run the code, the led remains lit and does not blink at all. I think the problem might not come from the code because that one is simple and great.
Therefore, I wonder if it is not due to cubemx configurations


Thanks in advance for your help.

Please edit your topic and copy paste relevant parts of your code.

Which dev board are you using? Nucleo or any other custom board?? Add details of the board you are using.

I am using a custom board. the board gets the microcontroller stm32f103RDT6.

What other details do you want?

Hello everyone!

The led is not still blinking but it is lit.
I got the following warning from the configuration and I wonder if that can prevent my led to blink.

Exactly, I was expecting this issue that’s why I have asked you about the board details in the first place. The PB12 pin you are using is mapped with I2C. This happen because, you have selected a board from Board selector. Use Board selector only if you are using boards from STM. If you are using custom board you have to select your controller using the MCU/MPU selector.


ah Okay thanks a lot for this tip, I will change and see what will happen. I didn’t know about it before.

1 Like

Hi I selected a MCU/MPU but I still have the same project but what is fantastic is that my led is now blinking

1 Like