Detailed Description

APIs for configuring auto ACK functionality.

These APIs are used to configure the radio for auto acknowledgment features. Auto ACK inherently changes how the underlying state machine behaves so users should not modify RAIL_SetRxTransitions() and RAIL_SetTxTransitions() while using auto ACK features.

The acknowledgment transmits based on the frame format configured via the Radio Configurator. For example, if the frame format is using a variable length scheme, the ACK will be sent according to that scheme. If a 10-byte packet is loaded into the ACK, but the variable length field of the ACK payload specifies a length of 5, only 5 bytes will transmit for the ACK. The converse is also true, if the frame length is configured to be a fixed 10-byte packet but only 5 bytes are loaded into the ACK buffer, a TX underflow occurs during the ACK transmit.

Unlike in non-ACK mode, ACK mode will always return to a single state after all ACK sequences complete, regardless of whether the ACK was successfully received/sent or not. See the documentation of RAIL_ConfigAutoAck for configuration information. To not auto acknowledge a series of packets after transmit or receive, call RAIL_PauseTxAutoAck(true) or RAIL_PauseRxAutoAck(true). When auto acking is paused, after receiving or transmitting (also regardless of success) a packet, the radio transitions to the same single state it always defaults to while acking. To return to normal state transition logic outside of acking, call RAIL_ConfigAutoAck with the "enable" field false and specify the desired transitions in the rxTransitions and txTransitions fields. To get out of a paused state and resume auto acking, call RAIL_PauseTxAutoAck(false) or RAIL_PauseRxAutoAck(false).

If the ACK payload is dynamic, the application must call RAIL_WriteAutoAckFifo() with the appropriate ACK payload after the application processes the receive. RAIL can auto ACK from the normal transmit buffer if RAIL_UseTxFifoForAutoAck() is called before the radio transmits the ACK. Ensure the transmit buffer contains data loaded by RAIL_WriteTxFifo().

Note, that if you are enabling auto ACK (i.e., "enable" field is true) The "error" fields of rxTransitions and txTransitions are ignored. After all ACK sequences, (success or fail) the state machine will return the radio to the "success" state. If you need information about the actual success of the ACK sequence, use RAIL events such as RAIL_EVENT_TXACK_PACKET_SENT to make sure an ACK was sent, or RAIL_EVENT_RX_ACK_TIMEOUT to make sure that an ACK was received within the specified timeout.

To set a certain turnaround time (i.e., txToRx and rxToTx in RAIL_StateTiming_t), make txToRx lower than desired to ensure you get to RX in time to receive the ACK. Silicon Labs recommends setting 10 us lower than desired:

As opposed to an explicit "Disable" API, set the "enable" field of the RAIL_AutoAckConfig_t to false. Then, auto ACK will be disabled and state transitions will be returned to the values set in RAIL_AutoAckConfig_t. When disabling, the "ackTimeout" field isn't used.

When RX auto acking is paused, the radio transitions to default state after receiving a packet and does not transmit an ACK. When RX auto ACK is resumed, the radio resumes automatically acking every successfully received packet.

When TX auto acking is paused, the radio transitions to a default state after transmitting a packet and does not wait for an ACK. When TX auto ACK is resumed, the radio resumes automatically waiting for an ACK after a successful transmit.