Error: Failed to erase sectors 0 @ 0x00000000 (Algo35: Flash protection violation. Flash is write protected

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error: Failed to erase sectors 0 @ 0x00000000 (Algo35: Flash protection violation. Flash is write protected

5,410 Views
shruthi1
Contributor I

Hi,

I am getting the above mentioned error. Further i am not able to load the programs to the FRDMK64 kit. Can any one throw some light on the above issue (like when this type of issue can occur) and also would like to know, how can i resolve the issue.

Thanks & Regards,

Shruthi N A

0 Kudos
Reply
5 Replies

4,651 Views
shruthi1
Contributor I

Hi Alice,

Actually I was trying with the demo projects. The issue got resolved due to the technical team support. Thank you for the support.

0 Kudos
Reply

4,651 Views
shruthi1
Contributor I

Hi,

Again after unlocking the device, initially i was able to debug with the examples programs. After doing with some changes in the program, if i execute the same program, i will get the error as "Error: Failed to erase sectors 0 @ 0x00000000 (Algo35: Flash protection violation. Flash is write protected" and if i download the different program and try to debug then i will get the error as "Error while programming flash: programming failed".

Can you please suggest me what would be the problem.

Thanks and Regards,

Shruthi N A

0 Kudos
Reply

4,651 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello SHRUTHI N A,

What about your project, please check whether your code project the flash to erase and write.

How about a simple demo project? You can also share your project.

BR

Alice

0 Kudos
Reply

4,651 Views
shruthi1
Contributor I

Hi,

Thank you for the update Alice.

I had been browsing the net to find the solution for the problem and found the solution in the below link:

https://mcuoneclipse.com/2014/10/05/unlocking-and-erasing-flash-with-segger-j-link/

But i was getting the same problem as unable to write in the flash since flash is write protected. So i use to follow the above for unlocking the device but i didn't erase the flash.

After unlocking the FRDM-K64F for 3 to 4 times, now i am getting the problem as "Error while programming flash: Programming failed and now if i unlock the FRDM-K64F.. FRDM-K64F will be in continuous reset mode.

I am unable to continue my work. I am not able to figure out the problem. Can anyone help me with this.

Thank and Regards,

Shruthi N A

0 Kudos
Reply

4,651 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello SHRUTHI N A 

It seems your chip is secured, try to use J-link commander unlock it,

go to J-Link Commander | SEGGER - The Embedded Experts  to download J-Link Commander. See attached video of how to use J-Link commander.
  


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply