2020-06-21 02:27 AM
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.
2020-06-21 06:02 AM
Hard time deciphering this..
If device is in Level 2 you aren't going to be able to access/modify it.
2020-06-21 06:17 AM
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.
2020-06-21 06:44 AM
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.
2020-06-21 06:54 AM
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.
2020-06-21 07:02 AM
Ahh.
This turned up with a Google search:
https://stackoverflow.com/questions/48927028/openocd-how-to-write-option-bytes-to-stm32f4
2020-06-21 07:13 AM
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.