I am using arduino environment to program the STM32L4 device. To give you brief about my system I have a board with STM32L4 as host controller and ESP connected over TX1,RX1(Serial1 of STM32L4). In my application ESP is sending messages over UART1 but most of my messages gets drop at STM32 reception end. (note - host controller is running with multiple other tasks like doing the sensor data acquisition and publishing the data to ESP over every 512ms.
As per my understanding may be Serail1.available() might not be able to detect the on Receive serial event and messages are getting drooped.(Serial configurations : baud rate :115200, start bit 1, stop bit : 1, parity :none )
Can you please help where can I focus to resolve/understand this UART packets loss issue.
Also - Can anyone let me know in arduino Serial.available() is using any Serial interrupt to check message on UART ? I yes how it is handled, if its not then I would also like to know how this is handled.
Any help or comments are appreciable.