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.

AGC_FREEZE ; freeze automatic gain control settings ?

Other Parts Discussed in Thread: CC1101, CC1100

My question regards the CC1101 transceiver (but it shouldn't matter what transceiver you are using), specifically the AGCCTRL0 register. I want to set the AGC_FREEZE.

I would like to know how to set the register so I can search for a sync word and then once found freeze the gain control settings until I power down the CC1101.

I'm not sure if this is possible though. I have tried using settings 1 and 3 for the AGC_FREEZE, but I think that the gain settings are only frozen until a new packet is received.

However, I want the gain settings to be frozen for all new packets coming in.

When I manually freeze all gain settings the transceiver sets the gain to a not optimal level (always sets the RSSI output at -81dBm no matter how close to the signal source). If I'm close to the signal source then the packet should be found and a RSSI level should be -20dBm and then all the packets coming in should have a RSSI around -20dBm. However, If I move far from the signal source then the gain settings should be fixed and the RSSI shoud decrease to -40dBm and below. When I currently do this all I get at the RSSI is -81dBm. 

I'd like to have the transciever run it's gain setting algorithm to search for a packet. Once a packet is found I want to freeze that gain setting until I power down the transceiver. I don't care how it happens. I can only think of using the AGCCTRL registers : a manual freeze or a AGC_FREEZE . I've tried both, but can get it working properly.

The gain setting to be frozen, but the RSSI shouldn't be frozen!!!

Please let me know if you can help. Thanks.

  • Try the following: Read back register AGCTEST (address 0x2B) when you receive the first packet. Write AGCCTRL0.AGC_FREEZE = 3 and then write the gain setting back to AGCTEST.

  • thanks. i'll try that.

  • As a simple test, use a RF signal generator as signal source and change the power level. You will then see that AGCTEST, and hence the gain, changes for different input power levels. When you freeze the AGC gain you can manually set the gain using AGCTEST.  For a given input power level you can read the AGC gain used from register AGCTEST and if you want to keep this gain setting for the next reception you set AGC_FREEZE = 3 and then write the value you previously read from AGCTEST back into AGCTEST.

  • Hi Sverre. That worked! I see that I can make the AGCTEST fixed.

    In order to access the AGCTEST read address I need to cast the MSB as a 1, so I should call 0xAB, not 0x2B for a read because reads always have a MSB = 1.

    I tried this and it seemed promising, but when I tried to write the AGCCTRL0 address (to fix AGC_FREEZE) then I receive data intermittently (the RXFIFO gets messed up, the data takes long to acquire), which is being transmitted from another tranceiver.

    But the freezing of the AGCTEST worked as you suggested. Maybe I need to rewrite AGCCTRL0 differently?

    It seems as though when the AGCTEST has a low value = say 57 then the data is more intermittent, but if the AGCTEST = say 129 then the data is received quickly.

    Thanks again for your help.

  • Quote: "Hi Sverre. That worked! I set the transceiver to receive every 5ms and print out the RSSI and gain setting.

    The RSSI reading is now strange though. For example, when I print the RSSI readings most of them read about -47dBm. But about every 3rd or 4th reading of the RSSI is around -97dBm to -110dBm.

    I wait to check the RSSI after 5ms delay. The RXtimout is 3ms, and I use the RC oscillator because I'm using WOR setting.

    I use both the CC1100 and CC1101."

    You write that the RX timeout is 3 ms and the RSSI is read after 5 ms. Is that where the problem is? What is the input power level when you read the RSSI, i.e is the TX still on and is the chip in RX mode at this time?

    If the CC1100/01 is in RX mode and the difference in the RSSI readings could also be due to the SPI sync issue descibed in the CC1101 Errata Note.  

  • Sorry. I edited my 1st message and the way the forum works is that it emails you the first message , not the one i edited and updated.

    What I was saying was that I did what you said, and it seemed promising, but when I tried to write the AGCCTRL0 address (to fix AGC_FREEZE) then I receive data intermittently (the RXFIFO stores incorrect received data and the data takes long to acquire), which is being transmitted from another tranceiver.

    But the freezing of the AGCTEST worked as you suggested. Maybe I need to rewrite AGCCTRL0 differently?

    It seems as though when the AGCTEST has a low value = say 57 then the data is more intermittent, but if the AGCTEST = say 129 then the data is received quickly and all the RXFIFO data is what it should be (not random garbage values).

    I can just set the AGCTEST = 129 and everything will work, but i was hoping I could fix this last issue.

    So you know what the AGCTEST  values can range from? Is high gain setting a larger value?

    Sorry for the confusion.

  • AGCTEST[7:6]: First LNA gain. '00' is maximum gain, '11' is minimum gain

    AGCTEST[5:3]: Second LNA gain. '000' is minimum gain, '111' is maximum gain

    AGCTEST[2:0]: Digital gain. '000' is minimum gain, '111' is maximum gain

     

  • thanks. you've been really helpful!!!!

  • Hello,I want to amplify every received signal to max. and I have freezed AGC GAIN as you said.
    <<<<Try the following: Read back register AGCTEST (address 0x2B) when you receive the first packet. Write AGCCTRL0.AGC_FREEZE = 3 and then write the gain setting back to AGCTEST.>>>>
    But the result confused me.When I set AGCTEST to 0x80, The rssi is -51dbm,and when I set AGCTEST to 0x3f,the rssi is -79dbm.,when I set AGCTEST to 0xC0, nothing can be received.Can you tell me why?
    the other register are set as follow:
    AGCCTRL2 0x00
    AGCCTRL1 0x49
    AGCCTRL0 0x9D