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-Q1: SO/GDO1 Pin high, device probably not entering PowerDown, high current measured, Not able to transmit

Part Number: CC1101-Q1
Other Parts Discussed in Thread: CC1101,

Hi,

We have a situation where the device has entered some mode from which it cannot recover without a full reset/hard reset.

When this happens we can observe following.

Device still communicates via SPI but does not send or receive new packets.

Device reports that it is in Rx when SNOP is called we then write following commands.

SIDLE

SFRX

SPWD

however following the last command

the GDO1/SO pin is driven logic high following release of CS.

Device draws continuous currents > 8mA

We also loose ability to go to Tx

We have Tx-if-CCA enabled however i thought that even if there are rx fifo overflows the above commands would release it.

It appears the device doesn't go to sleep. however it reports that it is idle but then when trying to transition to tx it also fails (probably stuck in some unreported internal 'still receiving') state.

Regards,

Norm

In a well functioning system the GDO1/SO pin is driven low and very low current.

  • Please provide info regarding the HW you are using (is this problem on a TI EM or custom HW)

    How often does it happen and on how many devices (all or just some)

    Please provide logic analyzer plots of all 4 SPI lines when trying to communicate with the device after it has failed.

    Siri

  • Hi Siri, thanks for your prompt reply. HW is our custom IOT HW using the PIC24 family of microcontrollers with CC1101 used for sub 1GHz comms as per above.

    The issue is systemic all CC1101-Q1 chips behave the same after couple of days of running in field. 

    We will be checking /auditing site for potential RF interference. 

    The boards are coated with hard epoxy and very small with great difficulty to obtain all four traces as requested.

    However we can see from the spi lines on the MISO line that the device responds to the commands as above.

    When SNOP is called it first responsds with 2F, we then command it to idle it responds with 2F (i.e currrent state) next we send SFRX it response with 0F  followed by SPWD and response is also 0F.

    The well behaved chips are going to sleep MISO line low (tri-state on GDO1 as per above)

    The malfunctioning ones are not going to sleep and the MISO line (GDO1) is high ..  also higher current than idle drawn.

    The application code on PIC24 is running (not hanging) pin assignments unchanged all working.

    any ideas

  • I am not sure I follow your description of the problem

    In the first post you write that

    “Device reports that it is in Rx when SNOP is called we then write following commands.

    SIDLE

    SFRX

    SPWD”

    In the second post you write “When SNOP is called it first responsds with 2F, we then command it to idle it responds with 2F (i.e currrent state) next we send SFRX it response with 0F  followed by SPWD and response is also 0F.”

    0x2F is TX and not RX, so which of the statements are correct?

    It is hard to say what is going on when you do not have the SPI pins available. Are you able to output any other GDO signals when debugging?

    Since the problem happens first after a couple of days, I suspect that the issue might be SW related.

    Since you are using Tx-if-CCA, that means that you enter RX before TX to check you channel and that you radio must be in RX before you should strobe STX.

    Even if you are only in RX to check RSSI, you might receive a noise that looks like your sync word.

    Have you written your SW so that you take care of all possible errors that can happen if you receive a packet?

    See for example the CC1101 errata note for the following bug:

    “RXFIFO_OVERFLOW Issue —Radio stays in RX state instead of entering RXFIFO_OVERFLOW state”

    Also make sure that you never flush any of the FIFOs before you have made sue that the radio is in a error state (overflow or underflow) or that the device is in RX.

    BR

    Siri

  • I apologise for the confusion: 

    "When the header byte, data byte, or command strobe is sent on the SPI interface, the chip status byte is sent by the CC1101 on the SO pin.

    We only managed to de-encapsulate the clock and SO so that we can sniff the SPI comms between micro and cc1101

    we know what we're sending so we were just reading clock and response:

    SENT: SNOP,   Response: 0x1F (i.e Rx)

    SENT: SIDLE,  Response: 0x1F 

    SENT: SFRX,   Response: 0x0F

    SENT: SPWD,  Response: 0x0F

    Well behaving devices go to sleep following the release of CS.

    Misbehaving devices do not appear to go to sleep following the release of CS.

    the code wasn't written by us but inherited through product acquisition:

    What i can see is being done:

    Following a sleep.

    micro wakes for application processing

    wakes the RF chip using the CS sequence

    Prepares the data packet

    Loads the Tx Fifo with data

    Goes straight to Tx

    set_RF_CS();
    RF_send_CMD(STX);
    clr_RF_CS();

    then goes to sleep.

    Every 9 seconds following tx it goes to rx and then from rx to sleep.

    Are you saying that for Tx-If-CCA setting it is mandatory to be in Rx state first?

    Can you also please explain the never flush fifo before making sure not in error remark?

    As you can see per above.. the fifo is regularly flushed to ensure that if it did enter that errata state that would be the only thing to bring it out of it?

    What is it so bad to call flush fifo from idle?

  • Hi Siri, not sure if you've read my reply below the query was marked as resovled,  but we can't find any issues with the software that are obvious other than some of your remarks that i kindly ask you to perhaps clarify some more why flush fifo commands musnt' be called unless there is error with fifo. also is there a possibility that there is a latched RSSI value that is above threshold from an overrun buffer that is preventing the new Tx Messages to be transmitted with the TX-IF-CCA setting if there was a RX fifo overflow that we are not handling properly?

  • Since I cannot get details on your code or the complete SPI plots, I can only answer very general, and it is hard to tell you what the problem is.

    When it comes to CCA, yes, the radio needs to be in RX to use this feature.

    TX is entered based on the channel is being clear or not, but for the radio to know if the channel is clear, it needs to listen to the channel (be in RX).

    When it comes to flushing the FIFO, this alters the FIFO pointers and should not be done in for example RX or TX state, as the pointers are being updated in these states if packets are sent/received. You should therefore NEVER flush the FIFO unless you are in an error state (flushing the FIFO is the way to get out of the error state). It is also safe to flush the FIFOs if you know that you are in IDLE state (error in my previous post where I wrote RX instead of IDLE)

    If you end up in an overflow state while being in RX to check the channel before going into TX, you will not able to enter TX.

    The overflow state must be handled properly first (by flushing the FIFO) and then you must enter RX again.

    Siri

     

  • Thanks for that Siri, greatly appreciated, We've deployed some diagnostics firmware to catch the states. I'll keep you updated. The one difference we've spotted is that the GDO1 pin was high in the failed units. 

    I've managed to insert myself onto the SPI lines from the micro by writing some custom firmware without resetting the RF chip.

    While i am going on one returned sample only, The RF chip appears to have all default values (i.e not our initialised/programmed values in it with one exception:)

    The settings for the GDOx pins are as follows:

    Our Setting Misbehaving Unit Default setting (datasheet)
    IOCFG0 2E 0x02 3F
    IOCFG1 2E 0x00 2E
    IOCFG2 2E 0x00 29

    Any ideas what would cause a reset and have those IOCFGx settings? and have the rest default.

    If it was full power reset or re-initialisation it would have the datasheet settings not 0x02, 0x00 and 0x00 

    I've then reprogrammed the MCU which re-initialises the RF chip and things work again. i.e there is not permanent damage to the RF circuitry.

    Any ideas?

    With that setting the GDO1 pin (SO) would be associated with RX overflow  which would explain why it is asserted high following the CS release.

    The problem is that nowhere in our code do have that value as a possible configuration for this pin.

    Regards,

  • I also queried the PKTSTATUS is either: 0x80 or  0x08  (i may not have typed that correctly in my excel sheet), the  marc_state is 0x01

  • Regarding the reset, I know that for the CC1101 (not the CC11x1-Q1) there is a table in the data sheet (Power-On Reset Requirements), and if these requirements are not overheld, you do not know the state of the registers when powering up, and a manual reset is required. I will reach out to someone knowing the Q1 device better than me to find out why the same requirements are not in the Q! data sheet.

    Siri

  • I'm now reading this section, would a similar wait time be required when waking the device from sleep:

    "When CS is pulled low, the MCU must wait until CC11x1-Q1 SO pin goes low before starting to transfer the header byte. This indicates that the crystal is running. Unless the chip was in the SLEEP or XOFF states, the SO pin goes low immediately after taking CS low.. "

    So is it possible that during the waking up process, attempting to write to the chip on SPI before the crystal has stabilized can reset the chip or put it into some unknown state?

    From our code i can see that we are not calling a reset anywhere other than at startup.

    Once configured and running the application will execute the commands discussed above to put the CC1101 to sleep  and then 1 second later we wake it up

    by:

    set_RF_SCLK();
    clr_RF_MOSI();
    set_RF_CS();
    nop(); nop();
    clr_RF_CS();
    delay_uSec(45);
    set_RF_CS();
    delay_uSec(100);
    int wait_delay = 0;
    while(wait_delay++ < 500)
    {
    if(RF_MISO == 0) break;
    }

    The MCU clock is 8MHz and instructions like increments and branch compare are  1 or 2 cycle instructions. so the above wait_delay will be anywhere between 250us to 500us 

    To be honest looking at it now, i'm not sure why the above was done and is so complicated.

    Shouldn't waking up the RF chip simply be:

    set_RF_CS();

    while(RF_MISO)

    {

    nop();

    }

     

  • Hello again Siri. Is there anything on this RF chip that would reset the chip if the receive signal was too strong from a powerful emitter close by? 

  • Hi Norm,

    The Receiver will just be in saturation and don't be able to demodulate anything.

  • Thanks Christin, just checking if there is some path for inbuilt protection of some sort? Several weeks of testing in house and we can't replicate the problem. Mean time to failure 3 days in field.  Would the above wakeup sequence that may initiate a manual reset contribute to our issue?