Skip to main content
Graduate
March 30, 2021
Question

External flash loader program not working

  • March 30, 2021
  • 4 replies
  • 2434 views

I am trying to develop an st-link utility external spi flash loader using STM32F411RE and Winbond W25Q32. Mass erase, Read, Sector erase are working well but the program not working, the following errors are pop-up 

1)Timeout during flash programming.

2)Error occurred during program operation!

3)Programming error @: 0x000010AC.

I also attached my full project file, please review and give suggestions

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    March 31, 2021

    Hello @User16438042334827474767​ and welcome to the STM32 Community,

    Which version are you using ?

    Could you try STM32Cubeprogrammer software. Then, please let me know if this solved your issue.

    Imen

    Graduate
    April 1, 2021

    1)I used the version attached, please check

    2) I also tried the cube programmer v2.4.0 , but I got the same result but new things happened. First mass erases work well and again when I do the same the mass erase fails. My log is given below.

    13:34:36 : Disconnected from device.

    13:34:37 : ST-LINK SN : 0670FF535155878281143214

    13:34:37 : ST-LINK FW : V2J37M26

    13:34:37 : Voltage : 3.25V

    13:34:37 : SWD freq : 4000 KHz

    13:34:37 : Connect mode: Normal

    13:34:37 : Reset mode : Software reset

    13:34:37 : Device ID : 0x431

    13:34:38 : UPLOADING OPTION BYTES DATA ...

    13:34:38 : Bank : 0x00

    13:34:38 : Address : 0x40023c14

    13:34:38 : Size : 8 Bytes

    13:34:38 : UPLOADING ...

    13:34:38 : Size : 1024 Bytes

    13:34:38 : Address : 0x8000000

    13:34:38 : Read progress:

    13:34:38 : Data read successfully

    13:34:38 : Time elapsed during the read operation is: 00:00:00.008

    13:34:49 : MASS ERASE ... 

    13:34:57 : Mass erase successfully achieved

    13:34:57 : UPLOADING ...

    13:34:57 : Size : 1024 Bytes

    13:34:57 : Address : 0x8000000

    13:34:57 : Read progress:

    13:34:57 : Data read successfully

    13:34:57 : Time elapsed during the read operation is: 00:00:00.007

    13:35:10 : MASS ERASE ... 

    13:35:15 : Error: Mass erase operation failed.Please verify flash protection

    13:35:19 : Memory Programming ...

    13:35:19 : Opening and parsing file: images.bin

    13:35:19 : File : images.bin

    13:35:19 : Size : 101252 Bytes

    13:35:19 : Address : 0x00000000 

    13:35:19 : Erasing memory corresponding to segment 0:

    13:35:20 : Erasing external memory sectors [0 24]

    13:35:25 : Error: failed to erase memory

    13:35:25 : Error: failed to erase memory

    Technical Moderator
    April 1, 2021

    Hi @User16438042334827474767​ ,

    I recommend you to update the STM32Cubeprogrammer V2.7.0 and upgrade the ST-Link firmware version (go to ST-LINK>firmware update), then try again and tell me if that solve the issue.

    I added the right topics to your question in order to increase its chance to be reviewed by our experts.

    Hello @Houda GHABRI​ 

    Can you please help @User16438042334827474767​  on this issue.

    Thanks

    Imen

    Graduate
    April 1, 2021

    thanks for your suggestions but still have the error

    Graduate
    April 1, 2021

     15:16:11 : Disconnected from device.

     15:16:12 : ST-LINK SN : 0670FF535155878281143214

     15:16:12 : ST-LINK FW : V2J37M26

     15:16:12 : Board    : NUCLEO-F091RC

     15:16:12 : Voltage   : 3.24V

     15:16:12 : SWD freq  : 4000 KHz

     15:16:12 : Connect mode: Normal

     15:16:12 : Reset mode : Software reset

     15:16:12 : Device ID  : 0x431

     15:16:12 : Revision ID : Rev A

     15:16:12 : UPLOADING OPTION BYTES DATA ...

     15:16:12 :  Bank     : 0x00

     15:16:12 :  Address    : 0x40023c14

     15:16:12 :  Size     : 8 Bytes

     15:16:12 : UPLOADING ...

     15:16:12 :  Size     : 1024 Bytes

     15:16:12 :  Address    : 0x8000000

     15:16:12 : Read progress:

     15:16:12 : Data read successfully

     15:16:12 : Time elapsed during the read operation is: 00:00:00.007

     15:16:31 : MASS ERASE ... 

     15:16:39 : Mass erase successfully achieved

     15:16:39 : UPLOADING ...

     15:16:39 :  Size     : 1024 Bytes

     15:16:39 :  Address    : 0x8000000

     15:16:39 : Read progress:

     15:16:39 : Data read successfully

     15:16:39 : Time elapsed during the read operation is: 00:00:00.007

     15:16:51 : Memory Programming ...

     15:16:51 : Opening and parsing file: images.bin

     15:16:51 :  File     : images.bin

     15:16:51 :  Size     : 101252 Bytes

     15:16:51 :  Address    : 0x00000000 

     15:16:51 : Download in Progress:

     15:17:56 : Error: failed to download Segment[0]

     15:17:56 : Error: failed to download the File