This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/LAUNCHXL-CC1310: how to receive more than 254Bytes in hs mode

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310

Tool/software: TI-RTOS

hi 

i use the rfPacketErrorRate_CC1310_LAUNCHXL_tirtos_ccs and do these(in tx.c):

change  PAYLOAD_LENGTH to 256     MAX_LENGTH to 512  

masking the pPacket[i] to get the rand();

in order to send 256bytes .

in rx.c

i change the MAX_LENGTH to 512 in order to receice more than 255 byte .

i get the packetLength in rx_callback by

uint8_t packetLength      = ((*(uint8_t*)(&currentDataEntry->data + 1)) << 8) | (*(uint8_t*)(&currentDataEntry->data));

when i send the data , the rx_callback  can be called .but the packetLength is zero.

but if i change the send length to less than 254 .i can get the right num.

is there some have to be set?

thanks!

  • TX: In TX the packet length is set by the length of the buffer, in this case the variable packet. Hence you can't remove this part if you want to send more than 254 bit. Note that if you want to use the example as is the counting variable has to be set to uint16_t to avoid wrap around issues.

    RX: It should be

    uint16_t packetLength = ((*(uint8_t*)(&currentDataEntry->data + 1)) << 8) | (*(uint8_t*)(&currentDataEntry->data));

    since the packetLength is 2 byte wide

    With these two modifications I read out the correct length for a 300 byte long packet.
  • you are right,thanks....