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.

cc1120 transmitter receives auto ack packet at second time

Hello,

I've got a question regarding auto ack.

Here are my register configurations for LBT + auto ack.

Receiver:

// LBT
writeByte = 0x10; cc112xSpiWriteReg(CC112X_PKT_CFG2, &writeByte, 1); 
writeByte = 10; cc112xSpiWriteReg(CC112X_AGC_CS_THR, &writeByte, 1); 

// TXOFF_MODE = RX
writeByte = 0x38; cc112xSpiWriteReg(CC112X_RFEND_CFG0, &writeByte, 1);

//RX Off mode=TX
writeByte = 0x2E; cc112xSpiWriteReg(CC112X_RFEND_CFG1, &writeByte, 1);

Transmitter:

// TXOFF_MODE = RX
writeByte = 0x38; cc112xSpiWriteReg(CC112X_RFEND_CFG0, &writeByte, 1);

// RXOFF_MODE = RX
writeByte = 0x3F; cc112xSpiWriteReg(CC112X_RFEND_CFG1, &writeByte, 1);

I realized that the transmitter can not receive auto ack packet when it strobes STX only one time.

I am sure of that the receiver receives packet at first time and sends auto ack but the transmitter can not receive first one. When the transmitter sends second time, it receives auto ack packet at this time.

Let me try to explain further:

while(packetSemaphore != ISR_ACTION_REQUIRED); 

// Reset packet semaphore
packetSemaphore = ISR_IDLE;

// Packet sent. Radio enters RX automatically to wait for ack. (2)

while(packetSemaphore != ISR_ACTION_REQUIRED);

// Reset packet semaphore
packetSemaphore = ISR_IDLE;

while(packetSemaphore != ISR_ACTION_REQUIRED); 

// Reset packet semaphore
packetSemaphore = ISR_IDLE;

If i program the transmitter as above, since it does not receive auto ack, condition remains true forever.

If i add a timeout as below it breaks while loop and try to send more time and transmitter receives auto ack at this time.

exceed = 1;
timeout = 0;

while((packetSemaphore != ISR_ACTION_REQUIRED) && exceed){
timeout++;
if(timeout > 200000){
exceed = 0;}
}
if(exceed == 1)
{
// Reset packet semaphore
packetSemaphore = ISR_IDLE;
}

exceed = 1;
timeout = 0;
// Packet sent. Radio enters RX automatically to wait for ack. (2)

while((packetSemaphore != ISR_ACTION_REQUIRED) && exceed){
timeout++;
if(timeout > 200000){
exceed = 0;}
}

if(exceed == 1)
{
// Reset packet semaphore
packetSemaphore = ISR_IDLE;
}

exceed = 1;
timeout = 0;

while((packetSemaphore != ISR_ACTION_REQUIRED) && exceed){
timeout++;
if(timeout > 200000){
exceed = 0;}
}

if(exceed == 0)
{
goto try_on;
}

else if(exceed == 1)
{

packetSemaphore = ISR_IDLE;

...

Does anyone have any idea?

  • Hi

    Not sure I understand exactly what you are trying to achieve but I want to emphasize one thing. The LBT algorithm is not designed to work when receiving packets so when using LBT you should set the SYNCT threshold so strict that no sync word is accepted. If you need to be able to receive packets when you are checking if the channel is clear, you should have an interrupt on packet received, to manually strobe IDLE to clear the TX strobe.

    This means that you cannot use AutoACk together with LBT. If RXOFF_MODE is TX and you receive a packet while in RX checking if the channel is clear, the packet in the TX FIFO will be sent after the packet is received, no matter if the channel is cleared or not (LBT not implemented).

    Siri