nrf7002-DK - Proprietary protocol - UART RTU framing

Hello,

I need to detect the end of messages coming through UART. nRF7002 asks requests and the device connected via UART responds. Baudrate is set to: 921600.

It is a proprietary protocol similar to MODBUS, where 2 bytes are be used to determine the length of the message.  The end of the message should be detected by a space between characters (3.5 characters) as described here:

Modbus Protocol

I would like to ask how to detect the end of frames on the nRF7002-DK?  Please ideally in the form of a procedure or piece of code.

Thank you

Related