Skip to main content
Visitor II
January 22, 2025
Question

Problem with UART in secure and unprivileged mode U5

  • January 22, 2025
  • 1 reply
  • 542 views

Hello,

I'm currently tring to do an app and I want to switch in unprivileged mode when I'm in secure and privileged mode. The switch is working but the uart is not working in unprivileged mode. It works in privileged mode. When I debug my code go in the hardfaultHandler(). I don't understand why. Here is my code attached. The hardfault happen in line 227. It exactly happen when I try to acces with the HAL_UART_Received().

 

Thanks for your help

 

 

    This topic has been closed for replies.

    1 reply

    Super User
    January 22, 2025

    @ECoud.1 wrote:

    When I debug my code go in the hardfaultHandler(). I don't understand why.

     

     


    Debugging Hard Faults:

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/708193/highlight/true#M51

    ECoud.1Author
    Visitor II
    January 22, 2025

    I already know where the fault is. I'm using generated code by ioc to program. I have not write the function so it's really hard to understand. The way it's configured it's supposed to work because the same program work for app with no TrustZone so it's really weird. I would really like to have some help.

     

    Thank you