cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 stuck on read protect

kps98
Associate III

Hi,

 

I am using STMH755ZI chip and i have a custom board created using this. I have code which receives a character through UART and jumps to DFU mode for flashing. I am not using ST LINK and in case of emergency, i kept BOOT0 pin open so that i can go to DFU mode in case UART is not working. My normal work flow is build code, get the ELF file,  Jump to DFU mode, use Cube Programmer for uploading the ELF file. It's been working fine for months now, and i never had any problem with it, till now. I uploaded a code as usual and i noticed that the board is not booting up. So i tried using BOOT0 pin for jumping to DFU mode for uploading a new code. But when i try to connect to the board using cube programmer it asks whether i should disable read protection or not. So i clicked OK. Then when i try to upload a code, or even erase the flash it gives me "Error: RDP level is set to 1, try using Read UnProtect (-rdu) command in order to remove the Read Out Protection.". I tried using command prompt to do the same, but it is giving me the same result.

kps98_0-1729412353225.png

kps98_1-1729412376730.png


I haven't done anything to turn ON read protection, it happened on its own. Every time i try to disable read protection it says, that it is disabled successfully, but when it try to upload a code or erase flash it asks me to disable read protection again. Is there anyway i reset the chip back to normal? 

Note : The only recent changes i've made are i increased the clock speed to 480MHz and i enabled I cache and D cache as i was using a neural network in the code. It was working fine and i was able to reduce loop time a lot. The last change i made is just a for loop resetting an array to its initial value 0. Which has nothing to do with read protect. 

 

Thanks 

Kiran

1 ACCEPTED SOLUTION

Accepted Solutions
kps98
Associate III

The issue is fixed now. I tried erasing the memory with ST Link and it is back to normal now. Thanks for all the help. 

 

Regards,

Kiran

View solution in original post

5 REPLIES 5
STOne-32
ST Employee

Dear @kps98 ,

May be you can check the setting of the VOS - Voltage scaling if set as in datasheet and also let us know the Increase/decrease of the Power Consumption from previous to new setting.   what was the previous clock ?

STOne32_0-1729538638345.png

 

If not set correctly the overconsumption can make a non stabilization of the internal Vcore and so loading the flash settings will be corrupt.

Hope it helps

STOne-32. 

There's the potential you've damaged or broken it, or the cables.

If you mess up the LDO/SMPS or VOS settings you can brick the parts.

One recovery method that works in specific cases is to strap BOOT0 HIGH, and cycle power completely several times, until you can connect with the devices and remove your broken code via erasure.

A reset is not sufficient, you must remove power from the board, and any leakage sources.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I was using 64MHz or something in the beginning as i was not able to increase clock speed without changing Voltage scaling and supply setting. So i didn't do it. But later i read some of the posts in this forum and found that Voltage scaling should be set to scale 0 and supply source should be LDO for it work. That's how i configured it to 480MHz. I also tested the same code i uploaded in two different boards and they work. What concerns me right now is will this happen again or not. 

This is my current setting

kps98_0-1730083771893.png

 

kps98_1-1730083815423.png

 

 



Thanks

I did try removing power couple of times, but i'll try it again. I actually have SWDIO and SWCLK pins open so i bought an ST link v3 for checking with that as well. 

kps98
Associate III

The issue is fixed now. I tried erasing the memory with ST Link and it is back to normal now. Thanks for all the help. 

 

Regards,

Kiran