HAL_UART_Receive_DMA has an unfindable hickup.
Hello,
I'm working with UART Communication between a RPi and an STMG070RB. For the UART communication I'm using the library function HAL_UART_Receive_DMA.
I have an initialize in which the Receive function waits for 3 bytes to be received (My messageheader). After this was received it reads the amount of remaining bytes to be read from the messageheader and then calls the receive function again, but this time to receive the remaining amount of bytes.
This works on a lot of occasions, but at one point gets stuck on the first part, it has received the messageheader, it has read the correct amount of remaining bytes from this messageheader, and then calls the receive to get these remaining bytes (the message body).
So at a random point this part just stop to work, it always receives the header, but then failes to receive the message body. I have checked with a logic analyzer and I am 100% certain the bytes do get send. It seems like my HAL_UART_DMA might be stuck in a state that I cannot find.
Anyone knows what I could check, and what could be going on?
Kind Regards,
Joey