Hi,
I have a problem with the built-in ETSI LBT implementation. I want to count the number of attempts to access the channel during LBT. Therefore I do the following:
1. Write 0x10 into the PKT_CFG2 register in order to enable ETSI LBT
2. Enable TXONCCA_DONE interrupt on GPIO2 (triggered by rising edge only) by writing 0x0F into register IOCFG2
3. Enable PKT_SYNC_RXTX interrupt (triggered by falling edge only) in order to get notified as soon as the packet has been transmitted successfully by writing 0x06 into IOCFG0
4. Write packet length into PKT_LEN register (telegram length = 34 bytes)
5. Enable fixed packet mode by writing 0x00 into PKT_CFG0 register
6. Write the telegram (34 bytes long) into the TX FIFO
7. Write 0x00 to register SYNC_CFG1 in order to prevent receiving telegrams during LBT
8. Strobe SRX in order to be able to measure the RSSI level in the air
9. Wait until RSSI is valid (RSSI_VALID bit in RSSI0 register = 1)
10. Strobe STX in order to start LBT
My assumption now is that the CC1120 transceiver tries to enter the channel automatically until the channel is assumed to be free and the transceiver switched to TX mode, meaning the TXONCCA_DONE interrupt should be asserted each time the transceiver tried to access the channel again. However, what happens is that this interrupt is only asserted once. If the channel is assumed to be free in this first interrupt (TXONCCA_FAILED = 0), the telegram is transmitted successfully. But if the channel is busy (TXONCCA_FAILED = 1), this interrupt is never asserted again afterwards and the telegram is not transmitted at all. So it seems to me that there is only one try to access the channel
My problem now is that I need to count the number of tries to access the channel, so that I can abort LBT if 5 tries in a row were not successfully. Therefore I need to count the number of TXONCCA_DONE interrupts. Am I doing something wrong? Is the assumption right, that the TXONCCA_DONE interrupt should be asserted not only the first time but each time the transceiver tried to access the channel?