cancel
Showing results for 
Search instead for 
Did you mean: 

Mass erase with bootloader on STM32L162

nicolas
Associate III
Posted on June 06, 2013 at 17:10

I have a problem doing mass erase of a STM32L162 when using the bootloader.

When i use the ''Flash Loader Demonstrator'', it give me the error ''FAIL: Unable to erase flash''.

The bootloader version is 3.1.

The pages erase work correctly.

Anyone know where this problem coming from ?

#stm32l162-mass-erase-bootloader
2 REPLIES 2
Amel NASRI
ST Employee
Posted on June 17, 2013 at 12:21

Hello Nicolas,

The mass erase isn't available for STM32L1xx devices and this is confirmed in the AN2606 in the section 7.4 (Important considerations):

Mass erase command is not supported by STM32L15xxx medium-density device

 

bootloader firmware. To perform a mass erase operation, two options are available:

 

– Erase all sectors one by one using the Erase command

 

– Set protection level to Level 1. Then, set it to Level 0 (using the Read protect

 

command and then the Read Unprotect command). This operation results in a

 

mass erase of the internal Flash memory (refer to Programming Manual PM0062

 

for more details).

 

 

You can get this AN from this

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00167594.pdf

.

ST.MCU

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.

nicolas
Associate III
Posted on June 18, 2013 at 14:41

Thank you for the answer.