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.

Auto-ACK message

Other Parts Discussed in Thread: CC2543

The CC2543 has the ability to send a (max) 32-char acknowledge message (ACK) upon receipt of an incoming RF message.  To do this, it uses one of two 32-char buffers stored in each of the eight RF-RAM "address" pages.  I want to customize the ACK depending on data in the incoming message.  For example, I want the sender to include a message ID in the incoming message and I want to return that ID in the ACK so the sender knows the message was received. 

The problem is, I don't find a way of interrupting the ACK transmission.  There doesn't appear to be an interrupt that would let me read the RX buffer, extract the message ID, and then insert it into the RF-RAM used for ACK before the ACK is sent.

Anyone have an idea how to do this, other than disabling auto-ACK and handling the send/ack myself?  This seems like such an obvious thing to need to do that I can't believe it isn't in the radio automation somewhere.

  • Hello Carl,

    There is no fully automatic setup of this that I know of, but the RXOK flag should be set before the radio switch from RX to TX. The time you have to verify and change the payload also depends on the turnaround time you set   in PRF_RX_TX_TIME and PRF_TX_RX_TIME. After receiveing a RXOK interrupt you can check the received payload and modify the acknowledgement payload if there is time before the transmission starts. It can be a good idea to pre-load the packet format in the ACK buffer and then just change the bytes needed if you want to send more than the ID. Also see the relevant description of the flow from the user guide below:

  • Hello again,

    Just to add some more info. The the radio will not check the ack-payload before the set turnaround time. Right before transmission of the ack payload occurs the length field will be checked first, then the radio will offload the number of bytes given in the length field from the ack-payload buffer to the modulator. To make sure you are within the safe time limits to load the payload you can check the radio status signals (found in register RFSTAT (0x618D) - RF Core Status) TX_ACTIVE and SFD. Make sure to update the length field before TX_ACTIVE goes high after a reception and then make sure to update the payload before the SFD signal goes high. Be careful as thees signals will go low again after the transmission is complete and you might end up thinking you are within time when you really are too late. You can check this by looking at the TXDONE interrupt which will be set when the radio is finished reading the ack-payload buffer.

  • An interesting and clever idea, although it seems fraught with timing issues.  I'd have to makes sure that nothing else interrupts the processor while I'm building the ACK message.  Turn off all interrupts, I suppose.  Proving the reliability of this technique under all processor load conditions would be "fun".