Skip to main content
Associate
June 18, 2026
Question

Implementing HAL_UART_IT in an OEMiRoT + Trustzone environment

  • June 18, 2026
  • 1 reply
  • 11 views

Hi ST!

I’ve been having some difficulty trying to integrate my UART project inside the architecture outlined in your OEMiRoT_Appli_TrustZone example for the NUCLEO-U385RG-Q. Note this example is incompatible with CubeMX and therefore I’m somewhat on my own when it comes to setting up additional peripherals (like USART3).

I’m currently able to send in a string to uart3 using HAL_UART_Transmit, however am not able to trigger an interrupt when attempting to input to uart3 - code below:

  char *msg = "USART3 TEST 3\r\n";
HAL_UART_Transmit(HUART, (uint8_t*)msg, strlen(msg), HAL_MAX_DELAY);

HAL_UART_Receive_IT(HUART, &uart_rx_byte, 1);

I’ve tried using VSCodes compare functionality to mirror a CubeMX generated TrustZone example with uart enabled, so far adjusting sections of stm32u3xx_it.h/c, stm32u3xx_hal_conf.h/c and partition_stm32u385xx.h, with some nudging from this forum question https://community.st.com/stm32-mcus-embedded-software-32/stm32h563-trustzone-usart3-interrupts-not-working-when-non-secure-120201. However no luck so far.

If possible could you provide a step-by-step example to guide us through adding peripherals such as uart and timers (this is the next step I’ll need to know) into a project that is unable to use CubeMX?

Thanks!

1 reply

AdsBotAuthor
Associate
June 21, 2026

Some additional info that might be useful:
- I’m using CubeIDE as my text editor and debugging (hotplug) interface.
- I’m using pins PC11 (CN7-2) for RX and PC10 (CN7-1) for TX. 
- The ‘No CubeMx’ guidance would need to include setting up interrupts for those peripherals.

Thanks team