2023-08-09 09:34 AM
Hello,
Please help me with the solution.
I have a product with STM32H723ZGT MCU as a core. For device production I need to set Read Out Protection (RDP) Level 2 option bytes which would protect the devices debug port. To program the RDP byte, I use STM32 HAL's flash API. Unfortunately, after the function HAL_FLASH_OB_Launch() device enters a special state and the only way to reset the application is power reset (POR). The problem with that is my product has an on board battery which has been soldered during the manufacturing process before programming.
I have found a possible solution, which is described in this video:
https://www.youtube.com/watch?v=f7vs0NwZPFo
I have even tested this solution with STM32L4 series MCU and it worked fine. Unfortunately, the same approach with the STM32H7 series did not work.
Any suggestions?
Solved! Go to Solution.
2023-08-11 04:39 AM
Found a solution:
In case of STM32H7 series to flash RDP byte and reset the MCU without using power cycle you first must initialize RTC Wakeup interrupt and then apply RDP flash functions including HAL_FLASH_OB_Launch(). After launch function HAL_PWR_EnterSTANDBYMode() is also required. In this case everything is going to work as expected. The final RDP flash part in my case look something like this:
FLASH_OBProgramInitTypeDef OB = {0};
HAL_FLASHEx_OBGetConfig(&OB);
2023-08-11 04:39 AM
Found a solution:
In case of STM32H7 series to flash RDP byte and reset the MCU without using power cycle you first must initialize RTC Wakeup interrupt and then apply RDP flash functions including HAL_FLASH_OB_Launch(). After launch function HAL_PWR_EnterSTANDBYMode() is also required. In this case everything is going to work as expected. The final RDP flash part in my case look something like this:
FLASH_OBProgramInitTypeDef OB = {0};
HAL_FLASHEx_OBGetConfig(&OB);