STM32 UART1 and UART3 conflicts
I’m experiencing an issue while developing firmware on a STM32L431CCU6 connected to:
- Xbee module (XB3-24Z8CM-J) via UART1
- RS485 driver (ST1480ABDR_ Via UART2
HAL_NVIC_SetPriority(USART1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USART1_IRQn);
HAL_NVIC_SetPriority(USART3_IRQn, 2, 0);
HAL_NVIC_EnableIRQ(USART3_IRQn);
The communication to the xbee works perfectly fine until the RS485 interface is polled at which point nothing is received via UART1 (no interrupt recorded), I’ve checked the interrupt priorities and UART1 has a higher priority.
Each interface works on its own but when attempting to use the interfaces together it seems to have a conflict somewhere. Would you have any suggestion/recommendations?
Appreciate any help and thanks in advance.
if(huart == &huart1)
{
Receive_test2(Rx_byte);//stores received byte into an array
Uart_Receive_raw(&huart1,0,1);//wait another byte
TIM15_reset_count();//timer overflows if no further bytes received for 1ms
}
if(huart == &huart3)
{
rs485RxIsr();
RS485_increment_Rx_byte();
}
