2014-10-16 08:32 AM
Hi all,
I have a very strange issue with STM32F407ZG; sometimesthe RDP level 1 is automatically set and then using STLink Utilities I can goback to RDP level 0.BUT, Now I get RDP level 1 SET and I can't go toRDP level 0 : Seems to be Irreversible (like RDP level2).I can connect with STLink utilities, to read theoption bytes and I see RDP Level1 and I'm not able to modify it to go to RDPlevel 0.Canany one help please ? it is urgent!Thx,Franco #stm32f4 #rdp-level-12014-11-05 04:03 AM
Hi
I also have the problem that I can't reset the RDP level backto level 0. I wrote the following code that I can load in theRAM and execute to set the RDP level but it doesn't work. Can someone give me any hints?int main(void)
{
HAL_Init();
SystemCoreClockUpdate();
SystemClock_Config();
FLASH_OBProgramInitTypeDef OBInit;
HAL_FLASHEx_OBGetConfig(&OBInit);
HAL_FLASH_Unlock();
HAL_FLASH_OB_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR| FLASH_FLAG_BSY);
OBInit.OptionType = OPTIONBYTE_RDP;
OBInit.RDPLevel = OB_RDP_LEVEL_0;
HAL_FLASHEx_OBProgram(&OBInit);
HAL_FLASH_OB_Launch();
HAL_FLASH_OB_Lock();
HAL_FLASH_Lock();
NVIC_SystemReset();
}
Thanks in advance
BR
Christian
2014-11-05 06:03 AM
Hi Christian,
Did you tried to go back to RDP level 0 using the ST-Link Utility?-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2014-11-05 07:13 AM
Yes, but it didn't work. I have this problem now on 3 microcontrollers.
2014-11-05 11:18 AM
Yes, but it didn't work. I have this problem now on 3 micro-controllers.
Hopefully you have access to USART1/USART3 and can strap BOOT0 High, and then un-brick them using the System Loader.2014-11-05 01:04 PM
No, the boot0 pin is strapped to low and the uarts are not connected on my PCB. It would be easier to replace the whole MCU :(
Do you see any problem with my code? Should it set the level back to level 0? What is the difference between my code executed from RAM and unbrick with the system loader?2014-11-06 07:12 AM
Hello,
Would it be possible to contact your FAE or local ST representative? It may be needed to recover chips having read out protection issue for further checks.Best Regards,-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2014-11-06 08:17 AM
I'm not using the HAL libraries, but used code that looks materially similar in nature to put the chips into Level 1. Getting them out is always more of a challenge, and certainly a head ache to work with on Keil + ULink2. I'd surmise the code I used to get to Level 0 managed to erase the part (and itself), but not change the level. I was able to get them working quickly via BOOT0 + USART1, but I have that option because the boards were designed for easy manufacture/test.
I'd certainly recommend anyone using RDP to become very well acquainted with all it's facets on a system they can readily debug and debrick.2015-03-15 08:15 AM