Skip to main content
Explorer
January 20, 2025
Solved

How to set RTC secure mode STM32U5 Series

  • January 20, 2025
  • 1 reply
  • 851 views

I would like to use the WKUP 6 (RTC_WUT_S) to wake up from Standby mode. I am already using WKUP 7 with a pin so I need the RTC to be in safe mode.

What would be the best way?

    This topic has been closed for replies.
    Best answer by STea

    Hello @JAltu.1 ,

    You can't add Trustzone to an existing non-Trustzone application. you will have to start a new project with Trustzone enabled in order to have the isolation and security features that it offers with the secure and non-secure projects.

    Regards

    1 reply

    ST Employee
    January 20, 2025

    Hello @JAltu.1 ,

    I don't get you exact request what do you mean by saying "RTC to be in safe mode".

    are you working with trustzone enabled?
    if yes then working with RTC in a safe way should be done by setting WUTSEC bit in control register 

    When WUTSEC is set:
    – RTC_WUTR register, plus WUTE, WUTIE and WUCKSEL control bits in the
    RTC_CR, CWUTF in the RTC_SCR, WUTF in RTC_SR, and WUTMF in
    RTC_SMISR can be read and written only in secure mode.
    – WUTPRIV in the RTC_PRIVCFGR can be written only in secure mode
    please refer to RM0456 section 63.3.4 RTC secure protection modes for more details. 
    Regards

    JAltu.1Author
    Explorer
    January 21, 2025

    Hi @STea ,

    Trustzone is disabled. I have seen it can be enabled creating a new project.

    But how can I do it in a existing project?

    Regards

    STeaAnswer
    ST Employee
    January 21, 2025

    Hello @JAltu.1 ,

    You can't add Trustzone to an existing non-Trustzone application. you will have to start a new project with Trustzone enabled in order to have the isolation and security features that it offers with the secure and non-secure projects.

    Regards