cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103 - memory protection

domanski0karol
Associate III
Posted on March 31, 2014 at 23:46

Hi, I have problem with my stm32f103, I use a st-link utility and I cant send program. When I try erase sectors I get error ''

Verify the memory protection.

''.

23:37:18 : ST-LINK Firmware version : V2J19S0

 

23:37:18 : Connected via SWD.

 

23:37:18 : Connetion mode : Normal.

 

23:37:18 : Debug in sleep and stop mode enabled.

 

23:37:18 : Device ID:0x410 

 

23:37:18 : Device flash Size : 128KBytes

 

23:37:18 : Device family :STM32F10x Medium-density

 

23:37:23 : Flash memory erased.

 

23:37:34 : Flash page 0 erased.

 

23:37:34 : Flash page 1 erased.

 

23:37:34 : Flash page 2 erased.

 

23:37:34 : Flash page 3 erased.

 

23:37:34 : Flash page 4 erased.

 

23:37:34 : Flash page 5 erased.

 

23:37:34 : Flash page @0x08001800 is not erased. Verify the memory protection.

 

23:37:34 : Flash page 7 erased.

 

23:37:35 : Flash page 8 erased.

 

23:37:35 : Flash page 9 erased.

 

23:37:35 : Flash page @0x08002800 is not erased. Verify the memory protection.

 

23:37:35 : Flash page 11 erased.

 

23:37:35 : Flash page 12 erased.

 

23:37:35 : Flash page 13 erased.

 

23:37:35 : Flash page @0x08003800 is not erased. Verify the memory protection.

 

23:37:35 : Flash page 15 erased.

 

23:37:35 : Flash page 16 erased.

 

23:37:35 : Flash page 17 erased.

 

23:37:35 : Flash page @0x08004800 is not erased. Verify the memory protection.

 

23:37:36 : Flash page 19 erased.

 

23:37:36 : Flash page 20 erased.

 

23:37:36 : Flash page 21 erased.

 

23:37:36 : Flash page @0x08005800 is not erased. Verify the memory protection.

 

23:37:36 : Flash page 23 erased.

 

23:37:36 : Flash page 24 erased.

 

23:37:36 : Flash page 25 erased.

 

23:37:36 : Flash page @0x08006800 is not erased. Verify the memory protection.

 

23:37:36 : Flash page 27 erased.

 

23:37:36 : Flash page 28 erased.

 

23:37:37 : Flash page 29 erased.

 

23:37:37 : Flash page @0x08007800 is not erased. Verify the memory protection.

 

23:37:37 : Flash page 31 erased.

 

23:37:37 : Flash page 32 erased.

 

23:37:37 : Flash page 33 erased.

 

23:37:37 : Flash page @0x08008800 is not erased. Verify the memory protection.

 

23:37:37 : Flash page 35 erased.

 

23:37:37 : Flash page 36 erased.

 

23:37:37 : Flash page 37 erased.

 

23:37:37 : Flash page @0x08009800 is not erased. Verify the memory protection.

 

23:37:38 : Flash page 39 erased.

 

23:37:38 : Flash page 40 erased.

 

23:37:38 : Flash page 41 erased.

 

23:37:38 : Flash page @0x0800A800 is not erased. Verify the memory protection.

 

23:37:38 : Flash page 43 erased.

 

23:37:38 : Flash page 44 erased.

 

23:37:38 : Flash page 45 erased.

 

23:37:38 : Flash page @0x0800B800 is not erased. Verify the memory protection.

 

23:37:38 : Flash page 47 erased.

 

23:37:38 : Flash page 48 erased.

 

23:37:38 : Flash page 49 erased.

 

23:37:39 : Flash page @0x0800C800 is not erased. Verify the memory protection.

 

23:37:39 : Flash page 51 erased.

 

23:37:39 : Flash page 52 erased.

 

23:37:39 : Flash page 53 erased.

 

23:37:39 : Flash page @0x0800D800 is not erased. Verify the memory protection.

 

23:37:39 : Flash page 55 erased.

 

23:37:39 : Flash page 56 erased.

 

23:37:39 : Flash page 57 erased.

 

23:37:39 : Flash page @0x0800E800 is not erased. Verify the memory protection.

 

23:37:39 : Flash page 59 erased.

 

23:37:40 : Flash page 60 erased.

 

23:37:40 : Flash page 61 erased.

 

23:37:40 : Flash page @0x0800F800 is not erased. Verify the memory protection.

 

23:37:40 : Flash page 63 erased.

 

23:37:40 : Flash page 64 erased.

 

23:37:40 : Flash page 65 erased.

 

23:37:40 : Flash page @0x08010800 is not erased. Verify the memory protection.

 

23:37:40 : Flash page 67 erased.

 

23:37:40 : Flash page 68 erased.

 

23:37:40 : Flash page 69 erased.

 

23:37:40 : Flash page @0x08011800 is not erased. Verify the memory protection.

 

23:37:41 : Flash page 71 erased.

 

23:37:41 : Flash page 72 erased.

 

23:37:41 : Flash page 73 erased.

 

23:37:41 : Flash page @0x08012800 is not erased. Verify the memory protection.

 

23:37:41 : Flash page 75 erased.

 

23:37:41 : Flash page 76 erased.

 

23:37:41 : Flash page 77 erased.

 

23:37:41 : Flash page @0x08013800 is not erased. Verify the memory protection.

 

23:37:41 : Flash page 79 erased.

 

23:37:41 : Flash page 80 erased.

 

23:37:42 : Flash page 81 erased.

 

23:37:42 : Flash page @0x08014800 is not erased. Verify the memory protection.

 

23:37:42 : Flash page 83 erased.

 

23:37:42 : Flash page 84 erased.

 

23:37:42 : Flash page 85 erased.

 

23:37:42 : Flash page @0x08015800 is not erased. Verify the memory protection.

 

23:37:42 : Flash page 87 erased.

 

23:37:42 : Flash page 88 erased.

 

23:37:42 : Flash page 89 erased.

 

23:37:42 : Flash page @0x08016800 is not erased. Verify the memory protection.

 

23:37:42 : Flash page 91 erased.

 

23:37:43 : Flash page 92 erased.

 

23:37:43 : Flash page 93 erased.

 

23:37:43 : Flash page @0x08017800 is not erased. Verify the memory protection.

 

23:37:43 : Flash page 95 erased.

 

23:37:43 : Flash page 96 erased.

 

23:37:43 : Flash page 97 erased.

 

23:37:43 : Flash page @0x08018800 is not erased. Verify the memory protection.

 

23:37:43 : Flash page 99 erased.

 

23:37:43 : Flash page 100 erased.

 

23:37:43 : Flash page 101 erased.

 

23:37:43 : Flash page @0x08019800 is not erased. Verify the memory protection.

 

23:37:44 : Flash page 103 erased.

 

23:37:44 : Flash page 104 erased.

 

23:37:44 : Flash page 105 erased.

 

23:37:44 : Flash page @0x0801A800 is not erased. Verify the memory protection.

 

23:37:44 : Flash page 107 erased.

 

23:37:44 : Flash page 108 erased.

 

23:37:44 : Flash page 109 erased.

 

23:37:44 : Flash page @0x0801B800 is not erased. Verify the memory protection.

 

23:37:44 : Flash page 111 erased.

 

23:37:44 : Flash page 112 erased.

 

23:37:45 : Flash page 113 erased.

 

23:37:45 : Flash page @0x0801C800 is not erased. Verify the memory protection.

 

23:37:45 : Flash page 115 erased.

 

23:37:45 : Flash page 116 erased.

 

23:37:45 : Flash page 117 erased.

 

23:37:45 : Flash page @0x0801D800 is not erased. Verify the memory protection.

 

23:37:45 : Flash page 119 erased.

 

23:37:45 : Flash page 120 erased.

 

23:37:45 : Flash page 121 erased.

 

23:37:45 : Flash page @0x0801E800 is not erased. Verify the memory protection.

 

23:37:45 : Flash page 123 erased.

 

23:37:46 : Flash page 124 erased.

 

23:37:46 : Flash page 125 erased.

 

23:37:46 : Flash page @0x0801F800 is not erased. Verify the memory protection.

 

23:37:46 : Flash page 127 erased.

 

23:37:53 : [fibon.bin] opened successfully.

 

23:38:14 : Memory-Loader error

 

23:38:14 : Error occured during erase operation!

 

23:38:15 : Programming error @ 0x200008F4!

 

Another error from true studio.

0690X00000605Y7QAI.png

#prot #memory #flash #stm32f103
27 REPLIES 27
Posted on April 01, 2014 at 00:37

There is an odd pattern going on there.

In the ST-LINK Utilities try to look at Target->Option Bytes, and Target->Chip Erase

Consider also downgrading the ST-LINK firmware, some people have encountered issue with V19, you could try V16 or V17?
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
domanski0karol
Associate III
Posted on April 01, 2014 at 08:11

I can erase chip but I cant erase sectors...  I also have error in the other ide, truestudio. Where I may download v16 or v17?

Posted on April 01, 2014 at 17:17

Yeah, really can't help you with Atollic/TrueStudio, not my thing.

Did the Options suggest anything was locked? Perhaps there are other issues with your system/installation?

Firmware Downgrade options

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/Downgrade%20ST-LinkV2%20firmware%20revision&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=98]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FDowngrade%20ST-LinkV2%20firmware%20revision&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=98
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
chen
Associate II
Posted on April 01, 2014 at 17:21

Hi

Atollic does not deal with the options bytes.

If the Flash sector lock bits have been set - Atollic cannot download.

You have to use the ST-Link Util to change the option bytes bits.

Hope that helps

domanski0karol
Associate III
Posted on April 01, 2014 at 18:31

When I try set Option bytes I get error. Any ideas what is wrong?

0690X00000605AzQAI.png

0690X00000603H5QAI.jpg

Posted on April 01, 2014 at 19:41

Any ideas what is wrong?

Perhaps there are other issues with your system/installation? Drivers, software, OS?

Try with current drivers/software directly from ST, rather than random stuff supplied by Atollic. Try a different system.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
domanski0karol
Associate III
Posted on April 02, 2014 at 09:48

Problem with 

Flash page @0x0801E800 is not erased. Verify the memory protection. is in my st-link or firmware?  I dont know why some of page was erased and some wasnt? 

I can only send to stm32f103 stm32f10xLoader.bin from st-link folders, when I try to send the other .bin or .hex files I get error.
chen
Associate II
Posted on April 02, 2014 at 10:40

Hi

Something is odd here!

Does the program put the processor into any of the low power modes?

(I noticed in the list output - the debugger mentions that debug in sleep mode enabled)

Have the SWD pins been used for IO or a peripheral?

domanski0karol
Associate III
Posted on April 02, 2014 at 11:14

I never use SWD pins. I can put program into processor in other low power modes but only stm32f10xLoader.bin.

When I put program into stm32f3 (processor in discovery board) all it's OK.