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.

CC1101 registers not updating

Other Parts Discussed in Thread: CC1101

First quick question:

in the data sheet, Section 29 states "after a chip reset, all the registers have default values...After a reset all registers that shall be different from the default value needs to be programmed..."  Does this mean that after the chip wakes up from a Sleep mode and if a SRES is issued, all of the registers need to be reprogrammed?

Main problem:

I am using the Anaren  A1101R09C-EZ4xbeing controlled from a PIC16LF1937.  I cut the traces on the Anaren board that interface SPI to the MSP430 as well as the GDO pin.  I tried setting all the registers to the values recommended in RF Studio and tried writing out one byte of data.  This did not work and the status bytes read back would vary.  I've reduced things to simply trying to change the GDO pin from putting out the OSC/192 signal to CHIP_RDYn.  My code is below, but it does not see to work. I've tried many variations of things that i've read online but none of them have worked for me and this is where I am now.  

CSn = 0;
while (SDI);
SSPBUF = SRES;
while(BF==0);
dummy = SSPBUF;
while (SDI);
SSPBUF = SIDLE;
while(BF == 0);
dummy = SSPBUF;
CSn = 1;

CSn = 0;
while(SDI);
SSPBUF = 0x02;
while (BF == 0);
dummy = SSPBUF;
SSPBUF = 0x29;
while (BF == 0);
dummy = SSPBUF;
CSn = 1;


Am i doing something wrong...is there a recommended best method to initial configuration setup?

  • Hi

    I am not familiar with the MCU you are using so there is no way I can tell from the code if this is correct or not. The best thing you can do is to use a logic analyzer and monitor the SPI traffic (all 4 lines) and see that you have configured the SPI with respect to phase and polarity. If you can make such a plot you can post it and we can take a look at to try to figure out what is going on.

    BR

    Siri

  • Hi Siri,

    Thanks for your response.  I'm sorry I am unable to post a plot of all four SPI lines but I believe I have that part configured properly. I can tell you with the four bytes sent from the controller, the CC1101 is responding 0x0F, 0x0F, 0x00, 0x0F.  Not sure if that's helpful.  Assuming the SPI is configured properly, can you confirm if my setup structure is correct, or is there a better way to code the initial configuration?

  • Here are screen captures from my SPI communication

    Yellow - SDI

    Blue - SDO

    Purple - SCK

    Green - CSn

     

    My code is simply this...

    Strobe Reset

    Strobe Idle

    Write single Byte to 0x02 (GDO)

    Write the value of 0x29 (make GDO CHIP_RDYn)

    CSn = 0;
    while (SDI);
    SSPBUF = SRES;
    while(BF==0);
    while (SDI);
    dummy = SSPBUF;
    CSn = 1;
    				
    CSn = 0;
    while (SDI);
    SSPBUF = SIDLE;
    while(BF == 0);
    dummy = SSPBUF;
    
    SSPBUF = 0x02;
    while (BF == 0);
    dummy = SSPBUF;
    
    SSPBUF = 0x29;
    while (BF == 0);
    dummy = SSPBUF;
    CSn = 1;

    There are two images but the entire communication could not be clearly viewed on one screen so it is broken into two images (there is overlap between the two).  Does this give any insight as to what I might be missing?

     

  • Ok, I was confused in the way the controller's data sheet was explaining how to align the data and clock. I had it set backwards and now the data is center aligned with the rising edge of the clock. That made it work to where I could change the default GDO function. However, when I turn the microcontroller off and leave the CC1101 powered, it resorts right back to have the OSC/192 clock on the GDO pin. This leads me back to my first question...

    in the data sheet, Section 29 states "after a chip reset, all the registers have default values...After a reset all registers that shall be different from the default value needs to be programmed..." Does this mean that after the chip wakes up from a Sleep mode and if a SRES is issued, all of the registers need to be reprogrammed?
  • Hi

    What do you mean by turning off the MCU? Are you putting it in some kind of low power mode or removing power from it? Either way, you must make sure that the radio does not lose power and that nothing is going on on the SPI bus when doing this.

    Whenever a SRES strobe is issued it is necessary to re-configure the radio (use SmartRF Studio to find recommended settings). However, there is no reason to do a SRES after the radio has been in SLEEP mode. However, some registers does not have retention in SLEEP and must be reprogrammed when the radio wakes up. These registers are listed in Section 29.2 in the data sheet. Note that entering SLEEP state is not the same as the radio losing power and are reset on power-on again. SLEEP is a state the radio can enter by sending a SPWD strobe.

    Siri

  • Also see for a minimum example how to set up the radio and send/ receive a packet.

  • Siri, thanks for the response and clarification on SRES!

    Sorry, I'm not actually turning the MCU off but I am using the programming software to hold it in a reset. I just noticed that when I put the MCU in a reset hold, the power shuts off briefly, which also means the radio is losing power for a short time. That's why it's resorting back to the OSC/192 setting. Thanks again!