AX5043 PKTSTART bit is always set in HDLC packets

Hi everyone!

We have the AX5043 receiving 60 kbps MSK HDLC packets at 436.5 MHz. We have long but relatively sane data packet sizes of 2-3K. The internal FIFO of the AX5043 only handles 240 bytes, so we take the the large data packets out in FIFO-sized chunks. The AX5043 should set the PKTSTART and PKTEND bits, so that we know which FIFO chunks are the start of a new packet and when a packet ends.

However, the PKTSTART bit is always 1. We’ve experimented with all sorts of chunk sizes, with all sorts of packet sizes, and no matter what PKTSTART is always set. PKTSTART is even set when PKTEND is set, which seems wrong. This, of course, means that we can’t tell what’s a large packet size and what’s a new small packet and the only packets that get through are less than 240 bytes.

Is there, somewhere, a non-obvious bit to set to enable PKTSTART to work as we expect?

Thank you!

Hello Andrew.

Please have a look at the AX5043 Programming Manual, for the description of PKTCHUNKSIZE register as well as the section “FIFO chunk encoding”. If PKTCHUNKSIZE is set to 0x02 you, then the received packet will be split into chunks of “length 2”, (Actually 3 bytes, 1 byte chunk header, 1 byte flags and 1 byte payload), so you can fetch each payload byte separately from the FIFO as it is received. (Please note: The AX-RadioLAB generated code is not prepared for fetching packets split into multiple chunks).

Also, normally the chip will automatically discard packets if for example packets which fail the crc check. This works by the RX only “committing” the FIFO data upon successful CRC check. Therefore, if you request the bytes as they arrive, you will have to take care yourself about discarding the bytes you already got – The RX can check the CRC only when the last byte has been received.

The structure above works when you know how long is going to be your packet. If instead you configure the device for receiving arbitrary length packets (see below), then it does not do any length handling and thus cannot generate a PKT END flag. You have to handle this case in software, turning the RX off as soon as you have received enough bytes according to your own protocol.