UART3 and UART4 interrupts together
Hi,
I am using UART3 and UART4 interrupts together in STM32G070RBT6TR processor and facing issues.
I have inserted my service routines as below.
/* USER CODE BEGIN USART3_4_IRQn 0 */
if((USART4->ISR & USART_ISR_TC_Msk) == USART_ISR_TC_Msk){
}
if((USART3->ISR & USART_ISR_TC_Msk) == USART_ISR_TC_Msk){
}
/* USER CODE END USART3_4_IRQn 0 */
It is possible that, both interrupts can occur any time. It may happen that, one interrupt (USART4) occur while other (USART3) is being served.
At the end of service routine both interrupts are getting cleared (with below functions created by CubeMX) and may miss the one which occur later.
HAL_UART_IRQHandler(&huart3);
HAL_UART_IRQHandler(&huart4);
Can you provide me some pointer how to handle this situation?
Thanks in advance.
BR
Narendra
