2023-09-22 02:24 AM
Hi, i have made an custom external loader for MX25L12833F-STM32L4P5. STM32CubeProgrammer gives me the following errors: "Error:failed to erase memory".
Some time it gives me the error: "Error: failed to download Segment[0]", "Error: failed to download the File".
Can someone help me out? In STM32CubeIDE i have tested my code, it erases(mass erase and sector erase), writes, and reads correctly. What i'm i doing wrong? I have put some necessary files about my external loader in attachement.
I activated verbose 3 to give me more details. It gives me following details when have the error: "Error:failed to erase memory":
------------------------Verbose 3:details---------------------
09:13:24:087 : Memory Programming ...
09:13:24:087 : Opening and parsing file: testbinary1M.bin
09:13:24:088 : File : testbinary1M.bin
09:13:24:088 : Size : 1.13 MB
09:13:24:088 : Address : 0x70000000
09:13:24:088 : Erasing Segment <0> Address <0x70000000> Size <1182720>Bytes
09:13:24:089 : Erasing memory corresponding to segment 0:
09:13:24:089 : Memory Erase via FlashLoader!
09:13:24:089 : Memory erase...
09:13:24:097 : halt ap 0
09:13:24:098 : w ap 0 reg 15 PC (0x20000000)
09:13:24:098 : w ap 0 reg 17 MSP (0x20000500)
09:13:24:098 : w ap 0 reg 16 xPSR (0x01000000)
09:13:24:099 : w ap 0 @0x20025A00 : 0x00000200 bytes, Data 0x00000000...
09:13:24:099 : w ap 0 @0x20000000 : 0x00000004 bytes, Data 0x0000BE00...
09:13:24:388 : w ap 0 @0x20000004 : 0x000255C4 bytes, Data 0x00000000...
09:13:24:390 : Erasing external memory sectors [0 36]
09:13:24:390 : Init flashloader...
09:13:24:390 : halt ap 0
09:13:24:390 : w ap 0 reg 0 R0 0x00000001
09:13:24:390 : w ap 0 reg 1 R1 0x00000000
09:13:24:391 : w ap 0 reg 2 R2 0x00000000
09:13:24:393 : w ap 0 reg 3 R3 0x00000000
09:13:24:394 : w ap 0 reg 4 R4 0x00000000
09:13:24:394 : w ap 0 reg 5 R5 0x00000000
09:13:24:395 : w ap 0 reg 6 R6 0x00000000
09:13:24:396 : w ap 0 reg 7 R7 0x00000000
09:13:24:396 : w ap 0 reg 8 R8 0x00000000
09:13:24:396 : w ap 0 reg 9 R9 0x00000000
09:13:24:396 : w ap 0 reg 10 R10 0x00000000
09:13:24:397 : w ap 0 reg 11 R11 0x00000000
09:13:24:397 : w ap 0 reg 12 R12 0x00000000
09:13:24:397 : w ap 0 reg 13 SP 0x00000000
09:13:24:397 : w ap 0 reg 14 LR 0x20000001
09:13:24:397 : w ap 0 reg 15 PC 0x20000DA5
09:13:24:403 : w ap 0 reg 16 xPSR 0x01000000
09:13:24:404 : w ap 0 reg 17 MSP 0x200259C4
09:13:24:404 : w ap 0 reg 18 PSP 0x00000000
09:13:24:404 : run ap 0
09:13:29:000 : halt ap 0
09:13:29:000 : Init function fail with timeout
09:13:29:000 : r ap 0 reg 16 xPSR 0x21000000
09:13:29:000 : Loader sector erase...
09:13:29:000 : Error: failed to erase memory
09:13:29:020 : Error: failed to erase memory
-------------------------END---------------------
2023-10-04 02:21 AM - edited 2023-10-04 02:24 AM
2)Another question ,what about the boot0-ph3 pin, do i have to do something with it? This pin is now connected to ground. The configuration of this pin, does it mather to make the external loader to work in stm32CubeProgrammer?