cancel
Showing results for 
Search instead for 
Did you mean: 

I need help setting the secure area on STM32H753 MCU

LSans.1
Associate

Hello,

I need help setting the secure memory area for the STM32H753XI mcu. I am running it on STM32H753I-EVAL kit.

I have read the dedicated part on the reference manual (chapter 5 on document RM0433), the "Introduction to STM32 microcontrollers security" (document AN5156) and I also read an implementation made for the STM32H7B3 mcus (documents AN5601).

My problem is that I cannot set the secure area successfully both programmatically and manually using STM32Programmer.

Using STM32Programmer I can set the security option bit, the PCROP area and the readout protection without a problem. The only thing STM32Programmer won't ever let me set is the secure area. If I change for example the values of SEC_AREA_START1 and SEC_AREA_END1 with something that isn't the stock value and try to write these values to the MCU registers, STM32Programmer returns an error by saying that the values that I set are not the ones that were already on the registers.

I tried setting the secure area using STM32Programmer by clearing the MCU memory first, then writing the SECURITY bit and hardware resetting and then changing the values of the secure area parameters (SEC_AREA_START1 and SEC_AREA_END1).

I also tried doing this with HAL low level drivers programmatically by following the steps mentioned in the reference manual in chapter 5, but I can't find a library that provides the RSS functions described in the section 5.4 of the manual. To set the flash option bytes I used te HAL FLASH Extension Driver (I used the HAL_FLASHEx_OBProgram() in particular). I followed the procedure described in section 33.3.2 in document UM2217 to set option bytes but it just doesn't work. HAL_FLASHEx_OBProgram() returns an error status and it fails to set the secure area.

I don't even have the applications examples mentioned "Step 2" at page 9 in document AN5601 because they do not exist for STM32H743I-EVAL (even if I am running STM32H753I-EVAL, all the examples made for STM32H743I-EVAL run totally fine so I assumed that these application would be there).

Here are the links of the manuals if you need them:

- RM0433 https://www.st.com/resource/en/reference_manual/dm00314099-stm32h742-stm32h743753-and-stm32h750-value-line-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

- AN5156: https://www.st.com/resource/en/application_note/dm00493651-introduction-to-stm32-microcontrollers-security-stmicroelectronics.pdf

- AN5601: https://www.st.com/resource/en/application_note/dm00763813-hdp-secure-area-for-stm32h7b3xx-microcontrollers-stmicroelectronics.pdf#page=7&zoom=100,0,145

- UM2217: https://www.st.com/resource/en/user_manual/dm00392525-description-of-stm32h7-hal-and-lowlayer-drivers-stmicroelectronics.pdf

I'm really stuck. Any help is really appreciated, even the smallest contribution.

Thank you very much.

2 REPLIES 2
Pavel A.
Evangelist III

ST support has a demo for this feature, it is not in the Cube package (yet).

@Jocelyn RICARD​ 

Thank you very much for your help, I'll try to contact ST directly.