2023-10-08 03:51 AM
Hi,
HAL Version used - 1.10.0
I am using RTO interrupt to identify if the transmitter has finished sending a packet.
In the IRQ handler "void HAL_UART_IRQHandler(UART_HandleTypeDef *huart)", this is considered as an error and it is aborting the ongoing DMA transfer from the UART peripheral to the memory. This is causing issues on our side.
The same is also posted here.
Why is this implemented it in this way ? Are we not supposed to use RTOF to identify if the transmitter has finished transmitting the packet ?
2023-10-11 04:34 AM - edited 2023-10-11 04:38 AM
UART is a stream based interface, not message based. It just sends a stream of bytes. There is no concept of beginning and end of a message. The only thing UART guarantees is the order of bytes. It doesn't guarantee delivery, correctness and generally also the pauses between bytes. Though, if both ends are under your control, then you can force the pauses to be meaningful for message delimiting or something else. Therefore messages, checksums etc. have to be implemented as a higher level protocols and processing layers in software.
And the HAL is a broken bloatware. Use a decent code instead: