cancel
Showing results for 
Search instead for 
Did you mean: 

STM32cubeide program uploads but doesn't run

RogerMc
Associate II

I have successfully built and run 20 lessons in a tutorial series with a Nucleo STM32F767NI board but suddenly, on the 21st tutorial, programs would upload but not run.

I went back to the previous tutorial and then to the first tutorial, a simple blinking LED program, which also appeared to upload OK but refused to run even after pressing the board's reset button.

After much experimenting, including reinstalling STMCubeID, I installed STM packages in my Arduino IDE.

Using Arduino, a flashing LED program uploaded and ran without problem, so the board seems to be OK.

The problem may have occurred after I did an ST-Link upgrade. But this shouldn't be a problem as the Arduino code worked OK.

 

1 ACCEPTED SOLUTION

Accepted Solutions
RogerMc
Associate II

Changing all occurrences  of GPIOA to GPIOB has all other problematic lessons working.

Thanks all for good advice.

View solution in original post

9 REPLIES 9
RogerMc
Associate II

I can't get Edit Message to work.

I installed the GPIO_IOToggle GPIO IO Toggle example which builds, uploads and runs OK but my other projects still refuse to run.

Hello,

From your first statement it came to mind that in your 21st tutorial you handled boot address in option bytes or you modified the boot pin. But when you said a simple blinking example loaded with Arduino IDE is running well, this makes me perplex!

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.

Thanks.

I am using STM32Cube IDE 1.15.0 on a Mac under OSX 14.4.1.

In addition to Arduino, under STM32Cube two STM32F767xx-Nucleo examples also work properly. Perhaps I accidentally, without knowing it, handled boot address in option bytes or modified the boot pin?

Could you tell me how to check boot address in option bytes and boot pin settings?

Also, there must be something different in the examples that enables them to work properly? But I haven't been able to spot the specific difference.

My tutorial lessons are bare metal lessons, unlike the examples.

 

I just discovered that programs that provide usart interaction with a terminal generate the intended output messages but LED control does not work; although, previously it did work for LED blinking and fixed state operations.

The example programs both involve LED blinking which works.

RogerMc
Associate II

Could this problem be related to an upgrade from STMCubeIDE version 13 to version 15?

I built a new project using version 15 and the original main.c but the problem remained.

I then found another project that runs OK.

The difference is that the OK project uses GPIOB whereas the ones that don't work use GPIOA.

Tip:

Always set in Cube (at first ! ) the debug connection you want to use enabled :

AScha3_0-1713083558167.png

because this is on GPIOA :

AScha3_1-1713083643627.png

So if you not do this, and use these pins for anything else - you stop any debug connection at this moment.

🙂

 

If you feel a post has answered your question, please click "Accept as Solution".

The tutorial I am using hasn't covered this so far.

However, your post prompted me to redo the first lesson from scratch.

In doing so I was instructed to use GPIOB, not GPIOA.

The first lesson now works.

How I ended up with  GPIOA in lesson 1 has me baffled as it originally did work.

I will check other lessons for GPIOA usage keeping in mind your advice.

Thanks.

RogerMc
Associate II

Changing all occurrences  of GPIOA to GPIOB has all other problematic lessons working.

Thanks all for good advice.