cancel
Showing results for 
Search instead for 
Did you mean: 

Shared USART3_8_IRQHandler source differentiation

Posted on April 10, 2017 at 12:24

Using the STM32 HAL API, I am using the HAL interrupt UART receive function 'HAL_UART_Receive_IT'.    In this case I am using UART6, because of this I have to use shared uart 3-8 interrupt handler 'USART3_8_IRQHandler(void)'.  If I wanted to use UART 4 and UART 6, when in the IRQ handler, how would I determine the UART source, so that I can correctly deal with the UART's data? 

Edit: Using STM32f091.

1 REPLY 1
Jack Peacock
Associate II
Posted on April 10, 2017 at 13:53

Look at the SCB->ICSR register.  The low 9 bits contain the interrupt vector, which will identify the USART requesting service.  You have to subtract 16 to skip the core vectors.

  Jack Peacock