2017-04-10 03:24 AM
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.
2017-04-10 04:53 AM
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