2017-04-12 06:22 AM
Hi all,
I am facing some issues here on flash erasing and programming. I am not getting where is the actual problem. I am using STM32F429ZET on our custom board. For testing purpose is used provided blinky example's hex file which support same controller. Problem here is that when i am trying to program this hex file using ST-Link utility it throws errors as:
18:22:34 : ST-LINK SN : 49FF70065178505057391687
18:22:34 : ST-LINK Firmware version : V2J28S618:22:34 : Connected via SWD.18:22:34 : SWD Frequency = 4,0 MHz.18:22:34 : Connection mode : Normal.18:22:34 : Debug in Low Power mode enabled.18:22:34 : Device ID:0x419 18:22:34 : Device flash Size : 512KBytes18:22:34 : Device family :STM32F42xxx/F43xxx18:23:04 : [Blinky.hex] opened successfully.18:23:04 : [Blinky.hex] checksum : 0x000F72B6 18:23:07 : Memory-Loader error18:23:07 : Error occured during erase operation!18:23:07 : Programmed memory Checksum: 0x00000000Any idea?
Any suggestions might help me.
2017-04-12 06:28 AM
Hi
p.Shravan
,I recommend you to upgrade the ST-Link firmware version through this link
/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fdevelopment-tool-software%2Fstsw-linkhtml
/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fdevelopment-tool-software%2Fstsw-linkhtml
Thanks
Imen
2017-04-12 08:19 AM
What did you use to create the file?
What memory regions are described in the linker script or scatter file?
If Keil, what does the internal download/debug report when configuring the ST-LINK in SWD mode?
Have you done any other testing on your board?
Can you use the System Loader via USART or USB in your design?
2017-04-12 08:56 AM
Hi Imen D,
Thank you for your quick reply. I tried this option but nothing changed.
2017-04-12 07:28 PM
Could it be that you have an external memory configured in ST-Link Utility/External Loader menu that do not mach with your hardware on your custom board?
2017-04-12 11:47 PM
Hi Clive One,
Please find my answers here,
What did you use to create the file?
I actually used Keil IDE.
What memory regions are described in the linker script or scatter file?
This is the memory region: Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00002b1c, Max: 0x00010000, ABSOLUTE)
If Keil, what does the internal download/debug report when configuring the ST-LINK in SWD mode?
This is the Build Output from Keil:
C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe -c SWD -p 'D:\SANDBOX\STM32\Blinky\Flash\Blinky.hex' 0x08000000 -V -Rst
STM32 ST-LINK CLI v3.0.0.0STM32 ST-LINK Command Line InterfaceST-LINK SN : 49FF70065178505057391687ST-LINK Firmware version : V2J28S7Connected via SWD.SWD Frequency = 4000K.Target voltage = 3.0 V.Connection mode : Normal.Device ID:0x419 Device flash Size : 512 KbytesDevice family :STM32F42xxx/F43xxxLoading file...Flash Programming: File : D:\SANDBOX\STM32\Blinky\Flash\Blinky.hex Address : 0x08000000Memory programming...±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0% 0%Memory-Loader errorError occured during erase operation!ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%Programming Complete.Programmed memory Checksum: 0x00000000MCU Reset.Have you done any other testing on your board?
No, I haven't done any testing. We just got this new custom board.
Can you use the System Loader via USART or USB in your design?
I think this custom board don't have such provision. Only what I got is SWD pins for programming.
2017-04-12 11:53 PM
Hi Max,
I haven't selected any External Loader. All these Loaders are deselected. Can you please tell me what is exactly meant by Memory-Loader error .
2017-04-13 04:20 AM
Looks like you build process uses external tools to download code. What about Keil's normal way of configuring the ST-LINK as a debugger internally and using that to download and debug? Make sure update target is selected and you have a flash algorithm selected for the STM32.
2017-04-13 04:47 AM
I think the answer is on the next line of your log:
Error occured during erase operation!
but at this stage, I have no idea what could be causing that error.
There are a few possible directions to investigate, in no particular order:
- follow
Turvey.Clive.002
recommendation and try if the debugger works- check the hex file content to make sure it'scorrect, i.e. not trying to use memory that dos not exist in your device
- check the protection in the option bytes (but I think the error message should be different in this case)
- check your power supply. If the supply is not able to sustain the programming current, you may have this kind of behavior.
- observe the reset pin during programming with an oscilloscope
Were you able to program this device on this board before or is it the first time?
Do you have several boards or only one? if you have several, you may want to try on another one.
regards,
Max
2017-04-13 05:11 AM
Hi,
What is the address that you want to program ?
Imen