I need to implement a simple uart protocol. most messages are fixed length (8bytes) with some exceptions.
here what I do in pseudo code, I send 8bytes and expect 8bytes back.
- nrfx_uarte_tx() [8bytes]
- in evt handler, TX_DONE event, nrfx_uarte_rx() [8bytes]
- RX_DONE event never happens
if I change nrfx_uarte_rx() to receive 7bytes, the first 7bytes of the message is received correctly.
to receive variable size messages, my idea is to receive as many bytes as I need to get the length information, then issue another nrfx_uarte_rx() call to get the rest.
the problem now is, why do I not receive the last byte of my message?
Chip: nrf52840 (ublox NINA-B3)
SDK: 15.2.0
OS: Linux
Toolchain: GNU Tools for Arm Embedded Processors 7-2018-q3-update