We are using a the Microcontroller for one of our products , we are using two UARTS for communication , however when both the UARTS are enabled we are facing some difficulties in the communication, can anybody help in this ?
Attached is the main file for the same.
Can we have a call or something with the concerned Engineers so that this can be resolved ?
I will give the details for this.
I had read your code already but I really unsure what is your idea to manage both USART.
I had saw somewhere in USART interrupt for USART2 that you didn't get USART2 data but I also do not see another configuration about USART and DMA so I don't see their relation between them.
Do you not have your own engineers?
STM32 parts should have no problem dealing with multiple UARTs concurrently and in full duplex modes. Should avoid using blocking functions, or blocking in interrupts or callbacks. Time there should be very brief, basically just buffering, with processing handled in other tasks or threads.
Is there no transmit function?
The two UARTS seem to be putting their data in the same receive buffer viz:
HAL_UARTEx_ReceiveToIdle_DMA(&huart1, RX_Buffer, 50); __HAL_DMA_DISABLE_IT(&hdma_usart1_rx, DMA_IT_HT); HAL_UARTEx_ReceiveToIdle_DMA(&huart2, RX_Buffer, 50); __HAL_DMA_DISABLE_IT(&hdma_usart2_rx, DMA_IT_HT);
Shouldn't you have RX_Buffer1 and RXBuffer2.?