cancel
Showing results for 
Search instead for 
Did you mean: 

512kB chip won't flash, but 2MB will (f429)

mannequins
Associate
Posted on March 04, 2016 at 06:47

I'm developing an application using the stm32f429 and have completed the firmware. The total size is only ~300kB so I'm trying to downgrade to the 'VE' version with only 512kb as it's substantially cheaper.

On my prototype boards, I can't get the 512kB version to flash at all, receiving the ''Failed to load flash loader'' error. I believe the stm32 is recognized (st-util reports that a stm32f42x or stm32f43x is connected), and I've verified the board is working -> I removed a non-working 512k version, and put on the VI (2MB) version which programmed straight away without a problem.

I'm currently using GDB to flash the chip, and use st-link to monitor. I'm using an f407 discovery board as the st-link, and flashing over the debug port.

I experimented with changing the linker script to state flash was only 512kB but it did not help (and this change didn't stop the 2MB chip from flashing). The reference manual suggests that the memory locations don't change with the different flash size.

So my questions:

- Are there any other differences in the stm32f429 besides the amount of flash memory?

- What problems could cause the 'failed to load flash loader' error?

- Is there some reason that I can't use all 512kB for my program, suggesting the error might be that the application is too big?

I will next test the 512kB version with a simple 'hello world' sketch to confirm the problem is not to do with the size of my application.

#stm32-stm32f429-flash-loader
2 REPLIES 2
Posted on March 04, 2016 at 14:50

The st-util is a third party application, you'd need to discuss it's failure with that party.

Would suggest you use the ST-LINK Utilities and confirm those work properly.

In the linker scripts I'd pay attention to the size of the RAM, and the placement/alignment of the stack. GNU/GCC favours sticking the stack at the end of RAM, which may be reduced on F401 and similar parts.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mannequins
Associate
Posted on March 04, 2016 at 21:04

Thanks for the suggestions.

I tried using the ST-LINK Utility and while it didn't solve the problem, it alerted me that the st-link chip on my f407 discovery board had out of date firmware.

I updated the firmware (from v1.x to v2.1) and now it is successfully programming the 512kB chips!

Thanks clive!