cancel
Showing results for 
Search instead for 
Did you mean: 

Bug when erasing flash STM32F412

Arlleex1
Associate II

Hello. Errata writes interesting things.

2.1.7 Flash sector erase issue for sectors 5 to 11

Description

Under specific conditions, flash erase issues are observed.

The involved sectors are: 5 to 11

Workaround

Do not perform sector erase on sectors 5 to 11.

Use flash mass erase to erase sectors 5 to 11.

That is, even the conditions under the bug manifests itself are unknown? In fact, this means one thing - it will be impossible to write a correct reliable bootloader. A bootloader that resists power failures. This is true?:(

9 REPLIES 9
TDK
Guru

> it will be impossible to write a correct reliable bootloader. 

That would be my interpretation as well, as doing a full erase would also erase your bootloader.

I have no background on this, but I imagine the errata was written by someone who didn't entirely understand the problem and, instead of figuring out the issue, came up with the lazy solution of "don't do that" instead.

There should be a relatively compatible STM32F4 chip you could use as a replacement. I don't see similar errata other members of the family:

https://www.st.com/resource/en/errata_sheet/dm00037591-stm32f405-407xx-and-stm32f415-417xx-device-limitations-stmicroelectronics.pdf

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

Thanks for your feedback!

I chose the chip according to many criteria (USB with > 5 EP, 2 CAN, QSPI, SDIO, 2 UART, SPI, 2 I2C, 256kB of RAM and all this in an LQFP-64 package). The determining factor was the price. Our distributors have found this chip to be the cheapest among the STM32F4. And now I understand why. The saddest thing is that ST has no plans to fix this in future revisions:(

Andreas Bolsch
Lead II

Errata sheet says that only first rev. , i.e. 'Z', is affected, whereas 'C' and '1' are not. Unfortunately the errata sheet doesn't doesn't tell when the particular revisions were introduced, but as there are already two more recent revisions not affected, it's quite likely 'Z' won't be shipped anymore by any official distributor.

Arlleex1
Associate II

Where did you read that?

I look here and see that this bug applies to all chip revisions:

https://www.st.com/resource/en/errata_sheet/dm00183231-stm32f412xexg-device-limitations-stmicroelectronics.pdf

ES0305 Rev 9 as of Oct. 2020, Table 4, this issue seems to be the only one fixed from rev. 'Z' to 'C' and '1'.

Arlleex1
Associate II

I found it! Thanks!

I will contact our distributors and try to find out the revision of the chips.

Thanks!

Hope remains🙂

Andreas Bolsch
Lead II

Just checked a F412-Disco board I got in 2017 or 2018: Rev. 'C' from week 32 in 2016. So 'Z' is probably *very* early.

Thanks!

I had nothing to check, and the information "Year" - "Revision" is unrealistic to find.