2025-02-19 3:22 AM
Hello,
I am trying to use the UART peripheral in the secure zone via interrupts in SBSFU for the STM32U575 microcontroller, but I am not receiving any data. I have used the same code for the non-secure region, and it correctly receives the first value. However, after triggering the interrupt again, I get a hard fault in the UART_Start_Receive_IT function. The code works perfectly without TrustZone enabled. I have configured the UART interrupt handler and ensured proper initialization, but I suspect there may be something missing for UART interrupts to work properly in the secure zone. Is there a specific setting or configuration required to enable UART interrupts in the secure zone of SBSFU?
Thanks in advance,
Istillaga
2025-03-10 6:06 AM - edited 2025-03-10 6:06 AM
Does anyone know how to solve the problem? I am still having the same problem.
2025-03-11 5:48 PM
Hi @Istillaga
Sorry for the late reply.
To isolate the problem, are you able to run the UART peripheral in interrupt mode first, outside of SBSFU project. I mean in a TrustZone enabled independent project.
TFM SBSFU project is designed to use the UART/YMODEM transfer from non secure project as news images and data to install are always encrypted.
A first analysis to modify the settings, may be you need first to modify some parameters in the boot_hal_cfg.h
file, set the following configurations:
#define TFM_OB_RDP_LEVEL_VALUE OB_RDP_LEVEL_0 // RDP0 for dev mode
#define TFM_TAMPER_ENABLE NO_TAMPER //ALL_TAMPER
In the project properties, also remove FLOW_CONTROL
variable to avoid issues during debugging.
Hope this is helpfull.
Best regards