cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152C-DISCO board does not work with CubeIDE

Kolkentu
Associate II

Hello

 

I just bought the STM32L152C-DISCO board. The board worked with its original firmware, but I can't use it with CubeIDE to create my own programs.

 

I create empty STM32project using Board Selector option:

Kolkentu_0-1739956045690.png

 

 

I made a simple program to make the LEDs on the board blink, but it cannot be debugged.

Kolkentu_1-1739956045691.png

 

 

 

The program downloads correctly, but this message appears:

Kolkentu_2-1739956045698.png

 

The board appears to be resetting, because the LEDs are blinking very fast, as if the program were continually restarting.

 

On the other hand, are there any example programs for cubeIDE with this board? I downloaded this file, but the examples are for other IDEs, it doesn't have CubeIDE projects: STM32Cube_FW_L1_V1.10.0

Can anyone help me?

Thanks

 

3 REPLIES 3
Ozone
Lead III

Your post contains not much information, like Cube and CubeIDE versions, and either the name of the example, or the source code.

This board was on the market when Atollic, IAR and Keil were the supported toolchains, with the example firmware based upon the SPL (standard peripheral library).
I don't know if any useful example(s) were ever created for Cube.
And I don't use Cube /CubeIDE, by the way.

> I create empty STM32project using Board Selector option: ...
But I suspect ST does very little regression testing with this old boards.

I would either try to find a dedicated Cube example for this board, or locate the "old" firmware package, get the demonstration firmware binary, and flash it to the board.

> I made a simple program to make the LEDs on the board blink, but it cannot be debugged.

When debugging such issues, always set the debugger to "break at reset vector", not "main".
And check in your project that both the MCU variant and the external quartz frequency match exactly.

Hi Ozone.

 

Thanks for your reply, but if you don't use CubeIDE, you can't help me. The problem is CubeIDE. I've done the same project in CubeIDE using only the STM32L152RCT6 microcontroller in the cubeIDE configurator, and it works perfectly. If the hardware is fine, and the software is fine, the problem is probably with the IDE, or how I use the IDE.

 

The information I've provided contains enough information to start working on the solution. And I'm providing the code I've used, which is only 6 lines that I've added to the program that, by default, creates the cubeIDE configurator.

The development board I'm using is not obsolete:

Kolkentu_0-1740040915288.png

 

 

Maybe you're referring to this other board, same appearance, but with a different microcontroller:

Kolkentu_1-1740040915302.png

 

The library I mentioned is for the old board, and the old ST IDE, called SW4STM32. That's why I'm asking for examples or test programs for the new board, that work with the new ST IDE, CubeIDE.

 

Can anyone help me?

 

Thanks

@Kolkentu first of all, a note: STM32L-DISCOVERY was renamed to STM32L152C-DISCO aka 32L152CDISCOVERY a long time ago, otherwise they are completely identical.

Your observed problem has nothing to do with the STM32CubeIDE, but with the usage of the board. Please bear in mind that it is not a NUCLEO board, but a DISCOVERY, where existing functions must be taken into account. In this specific case, when single stepping through the program, you will notice that you see the same messages in routine MX_GPIO_Init(void)when initialising pin IDD_CNT_EN_Pin, which is due to the enabling of counter U3 (M74HC4060, see schematics).

If you change the jumper J1 (Idd Measure, under the display) from ON to OFF and thus disable the counter, your programme should work without any problems - right?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.