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
domanski0karol
Associate III
Posted on April 03, 2014 at 18:28

I'm sure that the st-link on stm32f3discovery, connection stm32f103 <> st-link and supply is ok. Is it possible to software reset flash page or unprotection some page?

Posted on April 03, 2014 at 18:40

Is it possible to software reset flash page or unprotection some page?

 

Yes, via the ST-LINK utilities, or via the serial port an the Flash Loader Demonstrator (or custom app talking too the System Loader), or code you write yourself that runs on the STM32.

The Segger J-Link may also have additional tools/features.

It this point you might want to try some additional boards, or remove the part and replace it with another one.
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 05, 2014 at 21:18

I write a simple program to blink led, export to .bin and send by st-link utility and it's working but when I try send program with interupts handling I get error.I think that pages responsible for interupts are write-protection(?). Could you write a program which will unprotect these page?

Nickname306_O
Senior
Posted on April 07, 2014 at 17:26

Hello Karol,

The STM32F10x standard peripheral library firmware package contains an example to enable/disable Flash pages write-protection.

Please visit this link :

http://www.st.com/web/en/catalog/tools/PF257890

and go under ''STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\FLASH\Write_Protection''.

You can also use ST-LinkUtility to disable protection by unselecting protected pages as follows :

Target -> Option Bytes -> Flash Sectors Protection.

Best Regards,

Nouha

I write a simple program to blink led, export to .bin and send by st-link utility and it's working but when I try send program with interupts handling I get error.I think that pages responsible for interupts are write-protection(?). Could you write a program which will unprotect these page?

domanski0karol
Associate III
Posted on April 08, 2014 at 00:09

Hi, I try it but again I have error with some flash pages. It is possible that they are damaged?

Posted on April 08, 2014 at 02:27

Could you write a program which will unprotect these page?

If this were my problem I might, but I'm not sure I want to commit resources to it, it would be easier for me if you try other chips, or builds of your board, to confirm if it's just this one chip that's broken.

The reported failure is not in line with the write-protect groupings the option bytes describe.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
arganasss
Associate II
Posted on April 08, 2014 at 11:24

Hi karol,

  I didn't read all conversation, but i can tell you that i had some problems with flashloader tool in the past. I don't know why, but every time i installed flash loader program i was able to flash program to processor only once. After that, i always got same errors as you posted in the picture somewhere above. I don't know how this is possible, but then i solved my problem just by using another pc. Both pc had same windows, version of the tool was the same, and with one computer i never had a problem, and with another i was able to flash processor only once. I don't know how that is possible, but i suggest you to try another computer to do the same tasks and see how it goes.

Cheers, 

Arganas

Nickname306_O
Senior
Posted on May 21, 2014 at 17:57

Hi karoll,

Do you still have the poblem?

May be it is related to Hardware you have used.

- Try to load another example in the same board.

- Try to load the same code in another board.

let me know about results.

Best Regards,

Nouha