CC1101如何接收255个字节的数据包

CC1101如何接收255个字节的数据包

你好,

目前有客户的CC1101硬件调试基本OK,MCU收发64字节内的数据没问题了,但是在调试大数据包(大于64字节,不超过255)收发的时候,接收端无法接收到正确数据。经查阅datasheet,在page56有如下描述:

 

For packet lengths less than 64 bytes it is
recommended to wait until the complete
packet has been received before reading it out
of the RX FIFO.
If the packet length is larger than 64 bytes, the
MCU must determine how many bytes can be
read from the RX FIFO
(RXBYTES.NUM_RXBYTES-1). The following
software routine can be used:
1. Read RXBYTES.NUM_RXBYTES
repeatedly at a rate specified to be at least
twice that of which RF bytes are received
until the same value is returned twice;
store value in n.
2. If n < # of bytes remaining in packet, read
n-1 bytes from the RX FIFO.

3. Repeat steps 1 and 2 until n = # of bytes

remaining in packet.
4. Read the remaining bytes from the RX
FIFO.

这里的#代表什么意思?照我们理解,接收超过64字节的数据包会触发多次中断,MCU在中断中循环读取RX FIFO内的值,直到达到指定长度,但是实际测试只触发一次中断。

请问如何设定才能保障准确读取255个字节的数据?有参考的代码吗?

谢谢!