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 被停用、但 TIMEOUT (t_event0) occures

Guru**** 2481465 points
Other Parts Discussed in Thread: CC1200

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1304804/cc1200-rcosc-is-deactivated-but-timeout-t_event0-occures

器件型号:CC1200

您好!  

启动时、我将 GPIO0设置为模式"WOR_EVENT0 (0x37)"、并将寄存器"WOR_CFG0"和"WOR_CFG1"设置为默认值。

在我将 cc1200设置为睡眠模式(eWOR)之前、我启用 RCOSC 校准并激活 RCOSC。

在此之后、我发送一个空闲选通脉冲、等待校准并至少发送一个 WOR 选通脉冲。

现在、每当"t_event0"超时发生时、都会设置 GPIO0。  

这就像期待中的一样。

唤醒后、我要禁用 RCOSC 并向 WOR_CFG0.RC_PD 寄存器写入"1"。

但此时、"t_event0"超时仍为 occures 并设置 GPIO0。

-->我预计,这将不会发生,在去除 RCOSC 后。

在 CC1200用户指南中、建议在 RX/TX 外围二极管较长的情况下去除 RCOSC。

那么我现在的问题是、如何正确地取消激活 RCOSC、或者超时与停用的 RCOSC 相结合是正常的吗?

此致

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您不得将 RCOSC 校准(这是用户指南所述)与停用 RCOSC 本身相混淆。 校准通过 RC_MODE 控制、RCOSC 的开/关通过 RC_PD 控制。

    RCOSC 需要始终运行、但校准可以关闭。

    如果 RC_PD = 1、则不会发生 EVENT1

    我通过执行以下测试进行了检查:

    // 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);

    第一次发出异或门时、异或门就会正常工作

    第二次、不会发生任何事件

    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