cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F469 Weird Half-Executing old program stuck

ilyus
Senior II

I'm still struggling to get STM32F469 to run TouchGFX. Something REALLY weird happened yesterday, and I wasn't able to recover Disco board since.

I have 2 projects in STM32CubeIDE:

Project 1 turns on the screen and has some GUI - I backed up that project to always have something with working screen.

Project 2 is extension of Project 1, was a copy of project 1, which I developed further, also turns on display and has working GUI.

In my project 2, I have attached external flash loader and ticked the box "initialize". Ticking that box seems to have killed my disco board (before I ticked that box, I had no problems even with external loader, everything worked correctly. I don't exactly know what initialize does, it's not explained anywhere, so I figured whatever it initializes, I need it. But it bricked my disco board). How? No clue. This is what happened after that:

Weird thing 1: No matter what project I flash, I get blank screen. Known working project with GUI - project 1 - Also shows black screen. GPIO are initialized tho, there is backlight, which is GPIO activated.

Weird thing 2: I have unticked the initialize and disabled the external flash loader altogether - neither project produced picture nevertheless.

Weird thing 3: In known working project 1, I added blinking LED before LCD initialization. Flashed it - it blinked and produced no picture afterwards. Then I flashed project 2, which doesn't have blinking LED before LCD initialization. I flashed project 2 and...saw LED BLINK! Program was verified by the loader! I uploaded new program, but it executes old program!

Weird thing 4: whenever I program the MCU, I need to manually physically reset it every time (either reset button or power cycle), which was not the case before everything suddenly went to hell.

Googling yielded no results no matter how I worded the situation.

I have tried to update ST-Link Firmware. Didn't help.

Does anyone have any suggestion about what I broke this time, how, and how to fix it?

6 REPLIES 6
ilyus
Senior II

Update 1:

Tried erasing full chip using Stm32 Programmer, no changes in behavior: blinking LED was first gone obviously.

I loaded project 2 (No blinking LED) - I have LCD Backlight, otherwise dead.

I loaded project 1 (with blinking LED) - LED blinks, and then nothing happens.

I load project 2 again - LED still blinks (although no code says so) and nothing else happens.

I also need to reconnect USB from time to time - sometimes it says ST-Link is not connected for whatever reason

ilyus
Senior II

Update 2:

Tried to erase full chip, program Project 2 (no blink), put a few breakpoints and pressed "debug". The debugging DOES NOT STOP on breakpoints as if there are none. It doesn't even let me press "play" before the program starts execution, it just skips all breakpoints.

In the debugging window I see things like this:

Break at address "0x800371e" with no debug information available, or outside of program code.

No source available for "<signal handler called>() at 0xfffffff9"

Break at address "0xa0000000" with no debug information available, or outside of program code.

Break at address "0xfffffffe" with no debug information available, or outside of program code.

Seems like something goes wrong there and it jumps out of program code. Unfortunately, I'm way too inexperienced to make any sort of practical conclusions from this, but someone has to know something

ilyus
Senior II

Update 3:

Erased the chip. Took program LCD_DSI_VideoMode_DoubleBuffering example for my Disco Board. It showed warped image (as it usually does - all native examples need code adjustment on my board). Programmed Project 2 - LED blinks, then everything dead. Program LCD_DSI_VideoMode_DoubleBuffering again, LED still blinks and the screen stays DEAD

ilyus
Senior II

Update 4:

I've erased chips many times, used STM32cubeprogrammer to set option byte to use system memory, then flash again. At some point before that I noticed I couldn't change Flash contents - it stayed all FFFF unless I manually type some value at, say, 0x80000000. Somehow and somewhy in the end it finally came back to senses and works again as intended. I have no problem anymore, but it would be still very nice if someone could explain what actually happened and why, so that:

a) it doesn't happen again

b) I learn something out of it

MM..1
Chief II

Maybe you make some mistake in configure your DEBUG/RUN configurations in multiproject environment you need carefully switch between projects.

Too seems your st proggremmer have some trouble i for check use old ST Link utitlity .

the problem started right after I checked the "initialize" checkbox for the external loader for the flash memory and uploaded the program. Any idea what went wrong there?