2021-10-08 07:24 AM
19:47:11 : STM32CubeProgrammer API v2.5.0
19:47:17 : ST-LINK SN : 0670FF535155878281143214
19:47:17 : ST-LINK FW : V2J38M27
19:47:17 : Board : NUCLEO-F091RC
19:47:17 : Voltage : 0.02V
19:47:17 : SWD freq : 4000 KHz
19:47:17 : Connect mode: Under Reset
19:47:17 : Reset mode : Hardware reset
19:47:17 : Device ID : 0x431
19:47:17 : Revision ID : Rev A
19:47:18 : UPLOADING OPTION BYTES DATA ...
19:47:18 : Bank : 0x00
19:47:18 : Address : 0x40023c14
19:47:18 : Size : 8 Bytes
19:47:18 : UPLOADING ...
19:47:18 : Size : 1024 Bytes
19:47:18 : Address : 0x8000000
19:47:18 : Read progress:
19:47:18 : Data read successfully
19:47:18 : Time elapsed during the read operation is: 00:00:00.009
19:47:34 : Read File: C:\Users\micro_m_i_s\WorkDesk\Practice\ST\STM32F411RET6\TouchGFX_STM32F411_W25Q32_Example01\Debug\TouchGFX_STM32F411_W25Q32_Example01.elf
19:47:34 : Number of segments: 2
19:47:34 : segment[0]: address= 0x8000000, size= 0x142A4
19:47:34 : segment[1]: address= 0x90000000, size= 0x7528
19:47:55 : Memory Programming ...
19:47:55 : Opening and parsing file: TouchGFX_STM32F411_W25Q32_Example01.elf
19:47:55 : File : TouchGFX_STM32F411_W25Q32_Example01.elf
19:47:55 : Size : 112588 Bytes
19:47:55 : Address : 0x08000000
19:47:55 : Erasing memory corresponding to segment 0:
19:47:55 : Erasing internal memory sectors [0 4]
19:47:57 : Erasing memory corresponding to segment 1:
19:47:57 : Erasing external memory sectors [0 7]
19:47:58 : Download in Progress:
19:47:58 : Error: failed to download Segment[0]
19:47:58 : Error: failed to download the File
2021-10-19 01:11 AM
Hello MMadh.1,
Strangely enough, you mention using STM32F411RE but the ST-link says your board is NUCLEO-F091RC.
Are you using CubeProgrammer or CubeIDE to download your file ? I recommend you try reading your Flash, erasing sectors and downloading some .hex or .elf file directly using CubeProgrammer.
/Alexandre
2021-10-19 06:44 AM
Likely using the NUCLEO in lieu of a stand-alone ST-LINK/V2 pod, cheaper/available..
The 0x431 Device ID is consistent with it talking too an STM32F411RE.
Debugging External Loaders can be a challenge, but all the pins/peripheral can be used, for example diagnostic/progress information via USART
2021-10-20 06:46 PM
@Alexandre RENOUX NUCLEO-F091RC onboard STlink was used for programming the STM32F411RE MCU and the problem was found in the external loader Loader_Src.c file.I am just added HAL_ResumeTick() and HAL_SuspendTick() functions in every operations.working project file is attached.
2021-10-21 07:47 AM
I ran into this issue a while back and IIRC it is a known issue with internal flash interacting with the stm32programmer library.
The fix is to add "monitor flash mass_erase" to initialization commands in debug configurations > startup