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.

CC1200: RCOSC is deactivated, but timeout(t_event0) occures

Part Number: CC1200

Hi, 

At startup, I set GPIO0 to Mode "WOR_EVENT0 (0x37)" and the registers "WOR_CFG0", "WOR_CFG1" to default value.

Before I set cc1200 to sleep mode (eWOR), I enable the RCOSC calibration and activate the RCOSC.

After this, I send an IDLE-Strobe, wait for calibration and at least a WOR-Strobe.

Now the GPIO0 is set all time the "t_event0" timeout occures. 

--> This is like expect.

After wake-up, I want to disable the RCOSC and write an "1" to WOR_CFG0.RC_PD register.

But at this time, the "t_event0" timeout still occures and set the GPIO0.

--> I expect, this will not occure, after deacivation of RCOSC.

In the CC1200 UserGuide it is recommended, to deacivate the RCOSC, in case of long RX/TX periodes.

So my question is now, how to deactivte the RCOSC correctly, or is it normal, that the timeout occures with a deactivated RCOSC?

Best regards

  • You must not confuse deactivating the RCOSC calibration (which is what the user guide states) with deactivating the RCOSC itself. calibration is controlled through RC_MODE, powering on/off the RCOSC is controlled via RC_PD.

    The RCOSC needs to run all the time, but calibration can be turned off.

    The EVENT1 will not happen if the RC_PD = 1

    I checked this with a test doing the following:

    // Initialize MCU and peripherals
    initMCU();
    
    // Write radio registers
    registerConfig(); // WOR_CFG0 = 0x20
    
    // Calibrate radio
    trxSpiCmdStrobe(CC120X_SCAL);
    
    // Wait for calibration to be done (radio back in IDLE state)
    do {
        cc120xSpiReadReg(CC120X_MARCSTATE, &marcState, 1);
    } while (marcState != 0x41);
    
    // Calibrate the RCOSC
    calibrateRCOsc();
        
    // Output Event 0 and EVENT1 on GPIO for debugging;
        
      
    // Set radio in RX Sniff Mode
    trxSpiCmdStrobe(CC120X_SWOR); // After this strobe the WOR will work as normal
            
    // Delay to wath the GPIOs
    
    temp = 0x21;
    
    // Write new register value
    cc120xSpiWriteReg(CC120X_WOR_CFG0, &temp, 1); // turn off RCOSC
        
    // Set radio in RX Sniff Mode
    trxSpiCmdStrobe(CC120X_SWOR); // After this the EVENT will not happen since the RXOSC is not running
            
    while(1);
    
            // Wait for packet to be received
            while(packetSemaphore != ISR_ACTION_REQUIRED);

    the first time the SWOR is issues WOR will work as normal

    The second time, no events will happen

    Routine for manual calibration of RCOSC:

    /*******************************************************************************
    *   @fn         calibrateRcOsc
    *
    *   @brief      Calibrates the RC oscillator used for the eWOR timer. When this
    *               function is called, WOR_CFG0.RC_PD must be 0
    *
    *   @param      none
    *
    *   @return     none
    */
    static void calibrateRCOsc(void) {
    
        uint8 temp;
    
        // Read current register value
        cc120xSpiReadReg(CC120X_WOR_CFG0, &temp,1);
    
        // Mask register bit fields and write new values
        temp = (temp & 0xF9) | (0x02 << 1);
    
        // Write new register value
        cc120xSpiWriteReg(CC120X_WOR_CFG0, &temp,1);
    
        // Strobe IDLE to calibrate the RCOSC
        trxSpiCmdStrobe(CC120X_SIDLE);
    
        // Disable RC calibration
        temp = (temp & 0xF9) | (0x00 << 1);
        cc120xSpiWriteReg(CC120X_WOR_CFG0, &temp, 1);
    }

    Siri