Skip to main content
KChud.1
Associate
June 21, 2020
Question

Enable the read protection level 2 in the stm32f4x chip from raspberry pi.

  • June 21, 2020
  • 3 replies
  • 1730 views

Hi, 

I make the programming my stm32f4x chip using raspberry pi through OpenOcd. 

It's working and upload the code inboard but I am stuck in read protection level 2.

If we can not enable/active this through openocd then other option is also okay for me.

I just need to active level 2 protection through raspberry pi.

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
June 21, 2020

Hard time deciphering this..

If device is in Level 2 you aren't going to be able to access/modify it.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
KChud.1
KChud.1Author
Associate
June 21, 2020

yes ,

i want to this option for code protection. can you please tell me any method to i active the level 2 protection through raspberry pi.

TDK
Super User
June 21, 2020

You cannot disable level 2 protection, ever. You need a new chip. From the RM:

Memory read protection Level 2 is an irreversible operation. When Level 2 is activated,

the level of protection cannot be decreased to Level 0 or Level 1.

"If you feel a post has answered your question, please click ""Accept as Solution""."
KChud.1
KChud.1Author
Associate
June 21, 2020

No,

i don`t want to disable the level 2.

but i want to enable the level 2 protection.

I want to active this level 2 protection through raspberry pi.

Is it any option like openocd or any other way then i activated this from RPI.

TDK
Super User
June 21, 2020
"If you feel a post has answered your question, please click ""Accept as Solution""."
KChud.1
KChud.1Author
Associate
June 21, 2020

HI,

As per the link i run this query for activate the level 2 protection.

openocd -f interface/stlink-v2-1.cfg -f target/stm32f4x.cfg -c"init" -c "reset halt" -c "mww 0x40023c14 0XCC"  -c"exit"

but still not it entered in level 2. Please correct the query if it wrong.