cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with UART interrupt

Istillaga
Senior

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

2 REPLIES 2
Istillaga
Senior

Does anyone know how to solve the problem? I am still having the same problem.

CMYL
ST Employee

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