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.

swra415b CC1200 digital temperature readout

Other Parts Discussed in Thread: CC1200, CC1120

Hi, 

I'm reading DN403 / SWRA415b - CC112X/CC120X On-Chip Temperature Sensor in order to do a digital read-out of the temperature on a CC1200 device.

But I'm having some difficulties:

1)

The app note is done on a CC1120 device, and states that I should set 'FREQ_IF_CFG' to zero. On CC1200 the register is not called this, but I assume that its IF_MIX_CFG on this device. Correct?
(please add a footnote to the app not on next update)

2)

The app-note states that I can read the digital temperature value in the CHFILT register. I assumed that it must be the CHFILT_I2 / CHFILT_I1/ CHFILT_I0/ CHFILT_Q2/ CHFILT_Q1/ CHFILT_Q0 registers, and a look at the source-code confirmed this.

But I'm not sure how to use these I and Q values. Is it  D= sqrt(i^2 + q^2). A look at the source-code did not help, since it calls a global function updateGUI(), which is not included.

(please state how to convert I and Q values to the 'D' value in the next update of the app note.... and/or include the function that does all the calculations in the source code.)

3)

The values don't seem to be correct. I'm getting:

(using names from the demo code)

@ ~ 60-70 deg C

ADCValue_I / ADCValue_Q  :  185 / -2 decimal ( 0xb9 / 0x1fffe Hex)

@ ~ 22 deg C

 ADCValue_I / ADCValue_Q  :  46 / -30 decimal ( 0x2e / 0x1ffe2 Hex)

So _something_ is really working, but there is something wrong with the range.
Changing the temperature 40 degrees should change the digitally read value by ~40.000.

I'm getting marcState 0x6D before entering debug-mode and 0x5F after (again refering to the demo source code).

Is it a problem that there is something connected to the GPIO's? 
Intention is just to route the voltage from the temperature circuit to the ADC. But if it is 'leaked' to a pin, which I pull high/low externally, it could be a problem, or?

Any suggestions highly appreciated?

/T

  • Any comments, a code snippet on how updateGUI() is presenting the values is also welcome.

    /Anders

  • Hi, I'm having the exact problems you'r describing... Did you manage to solve them? If so, I'd REALLLLY want to hear how you did for the datasheet sucks....

    I also found out that the coefficient for the second order equation to use for temperature calculation are wrong (or may be I'm missing something)... Any how, If you solve the equation for T, ther are no real number solutions for readout values above 17853 (wich is less than 20oC according to the graph).....

    Really crappy datasheet.... If the at least have gave me a third data pointe then I would have computed the coefficients my self).....

  • See attached code for digital readout on CC1200.

    0842.cc120x_easy_link_reg_config.h

    //******************************************************************************
    //! @file       cc120x_easy_link_rx.c
    //! @brief      This program sets up an easy link between two trxEB's with
    //!             CC112x EM's connected.
    //!             The program can take any recomended register settings exported
    //!             from SmartRF Studio 7 without any modification with exeption
    //!             from the assumtions decribed below.
    //
    //              Notes: The following asumptions must be fulfilled for
    //              the program to work:
    //
    //                  1.  GPIO2 has to be set up with GPIO2_CFG = 0x06
    //                      PKT_SYNC_RXTX for correct interupt
    //                  2.  Packet engine has to be set up with status bytes enabled
    //                      PKT_CFG1.APPEND_STATUS = 1
    //
    //  Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
    //
    //  Redistribution and use in source and binary forms, with or without
    //  modification, are permitted provided that the following conditions
    //  are met:
    //
    //      Redistributions of source code must retain the above copyright
    //      notice, this list of conditions and the following disclaimer.
    //
    //      Redistributions in binary form must reproduce the above copyright
    //      notice, this list of conditions and the following disclaimer in the
    //      documentation and/or other materials provided with the distribution.
    //
    //      Neither the name of Texas Instruments Incorporated nor the names of
    //      its contributors may be used to endorse or promote products derived
    //      from this software without specific prior written permission.
    //
    //  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    //  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    //  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    //  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    //  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    //  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    //  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    //  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    //  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    //*****************************************************************************/
    
    
    /*******************************************************************************
    * INCLUDES
    */
    #include "msp430.h"
    #include "lcd_dogm128_6.h"
    #include "hal_spi_rf_trxeb.h"
    #include "cc120x_spi.h"
    #include "stdlib.h"
    #include "cc120x_easy_link_reg_config.h"
    #include "bsp.h"
    #include "bsp_key.h"
    #include "io_pin_int.h"
    #include "bsp_led.h"
    
    
    /*******************************************************************************
    * DEFINES
    */
    #define ISR_ACTION_REQUIRED 1
    #define ISR_IDLE            0
    #define RX_FIFO_ERROR       0x11
    
    #define GPIO3               0x04
    #define GPIO2               0x08
    #define GPIO0               0x80
    
    
    /*******************************************************************************
    * LOCAL VARIABLES
    */
    //static uint8  packetSemaphore;
    static uint32 packetCounter = 0;
    
    /******************************************************************************
    * LOCAL VARIABLES
    */
    static uint32 ADCValue_I = 0;
    static uint32 ADCValue_Q = 0;
    /*******************************************************************************
    * STATIC FUNCTIONS
    */
    static void initMCU(void);
    static void registerConfig(void);
    static void runRX(void);
    static void run_MARC_debug(void);
    static void radioRxISR(void);
    static void updateLcd(void);
    static void halMcuWaitUs(uint16 usec);
    static void halMcuWaitMs(uint16 msec);
    
    
    /*******************************************************************************
    *   @fn         main
    *
    *   @brief      Runs the main routine
    *
    *   @param      none
    *
    *   @return     none
    */
    void main(void){
      uint8 RegValue = 0;
      uint8 marcState;
      // Initialize MCU and peripherals
      initMCU();
      
      // Write radio registers
      registerConfig();
      
      //Set chip in RX
      trxSpiCmdStrobe(CC120X_SRX);
      
      // Read marcstate to check state
      cc120xSpiReadReg(CC120X_MARCSTATE, &marcState, 1);
      do {
            cc120xSpiReadReg(CC120X_MARCSTATE, &marcState, 1);
        } while (marcState != 0x6D);
      
      // Enter run_MARC_debug, the chip has to be reset to resume normal functionality
      run_MARC_debug();
      
      // Read marcstate to check state
      cc120xSpiReadReg(CC120X_MARCSTATE, &marcState, 1);
      
      while(1){
        
        halMcuWaitMs(1000);
        bspLedSet(BSP_LED_1);
        cc120xSpiReadReg(CC120X_CHFILT_I2, &RegValue, 1);
        ADCValue_I = ((uint32)RegValue) << 16;
        cc120xSpiReadReg(CC120X_CHFILT_I1, &RegValue, 1);
        ADCValue_I |= (((uint32)RegValue) << 8) & 0x0000FF00;
        cc120xSpiReadReg(CC120X_CHFILT_I0, &RegValue, 1);
        ADCValue_I |= (uint32)(RegValue) & 0x000000FF;
    
        cc120xSpiReadReg(CC120X_CHFILT_Q2, &RegValue, 1);
        ADCValue_Q = ((uint32)RegValue) << 16;
        cc120xSpiReadReg(CC120X_CHFILT_Q1, &RegValue, 1);
        ADCValue_Q |= (((uint32)RegValue) << 8) & 0x0000FF00;
        cc120xSpiReadReg(CC120X_CHFILT_Q0, &RegValue, 1);
        ADCValue_Q |= (uint32)(RegValue) & 0x000000FF;
        
        updateLcd();
        ADCValue_I = 0;
        ADCValue_Q = 0;
        bspLedClear(BSP_LED_1);
      }
    }
    
    /******************************************************************************
     * @fn          run_MARC_debug
     *
     * @brief       puts radio in RX and enter MARC debug, turns off the IFAMP
     *                
     * @param       none
     *
     * @return      none
     */
    static void run_MARC_debug(void){
      uint8 txBuffer[18] = {0x0F,0x28,0x02,0x90,0x42,0x1B,0x7E,0x1F,0xFE,0xCD,0x06,0x1B,0x0E,0xA1,0x0E,0xA4,0x00,0x3F};
      uint8 writeByte;
     
       
      // Write debug init to tx fifo
      cc120xSpiWriteTxFifo(txBuffer,sizeof(txBuffer));
      // Run code from FIFO
      writeByte=0x01; 
      cc120xSpiWriteReg( CC120X_BIST, &writeByte, 1);
      // Strobe IDLE
      trxSpiCmdStrobe(CC120X_SIDLE); 
      // Set IF AMP in PD
      writeByte=0x1F;
      cc120xSpiWriteReg( CC120X_WOR_EVENT0_LSB, &writeByte, 1);
      // Strobe SXOFF to copy command over
      trxSpiCmdStrobe(CC120X_SXOFF); 
    }
    
    
    /*******************************************************************************
    *   @fn         radioRxISR
    *
    *   @brief      ISR for packet handling in RX. Sets packet semaphore
    *               and clears ISR flag
    *
    *   @param      none
    *
    *   @return     none
    */
    //static void radioRxISR(void) {
    //
    //    // Set packet semaphore
    //    packetSemaphore = ISR_ACTION_REQUIRED;
    //
    //    // Clear ISR flag
    //    ioPinIntClear(IO_PIN_PORT_1, GPIO2);
    //}
    
    
    /*******************************************************************************
    *   @fn         initMCU
    *
    *   @brief      Initialize MCU and board peripherals
    *
    *   @param      none
    *
    *   @return     none
    */
    static void initMCU(void) {
    
        // Init clocks and I/O
        bspInit(BSP_SYS_CLK_8MHZ);
    
        // Init LEDs
        bspLedInit();
    
        // Init buttons
        bspKeyInit(BSP_KEY_MODE_POLL);
    
        // Initialize SPI interface to LCD (shared with SPI flash)
        bspIoSpiInit(BSP_FLASH_LCD_SPI, BSP_FLASH_LCD_SPI_SPD);
    
        // Init LCD
        lcdInit();
    
        // Instantiate transceiver RF SPI interface to SCLK ~ 4 MHz
        // Input parameter is clockDivider
        // SCLK frequency = SMCLK/clockDivider
        trxRfSpiInterfaceInit(2);
    
        // Enable global interrupt
        _BIS_SR(GIE);
    }
    
    
    /*******************************************************************************
    *   @fn         registerConfig
    *
    *   @brief      Write register settings as given by SmartRF Studio found in
    *               cc120x_easy_link_reg_config.h
    *
    *   @param      none
    *
    *   @return     none
    */
    static void registerConfig(void) {
    
        uint8 writeByte;
    
        // Reset radio
        trxSpiCmdStrobe(CC120X_SRES);
    
        // Write registers to radio
        for(uint16 i = 0;
            i < (sizeof(preferredSettings)/sizeof(registerSetting_t)); i++) {
            writeByte = preferredSettings[i].data;
            cc120xSpiWriteReg(preferredSettings[i].addr, &writeByte, 1);
        }
    }
    
    
    /*******************************************************************************
    *   @fn         updateLcd
    *
    *   @brief      updates LCD buffer and sends buffer to LCD module
    *
    *   @param      none
    *
    *   @return     none
    */
    static void updateLcd(void){
      
          // Update LDC buffer and send to screen.
          lcdBufferClear(0);
          lcdBufferPrintString(0, "    Temp test    ", 0, eLcdPage0);     
          lcdBufferPrintInt(0, ADCValue_I, 10, eLcdPage3);
          lcdBufferPrintInt(0, ADCValue_Q, 10, eLcdPage4);
          lcdSendBuffer(0);
    }
    
    
    /***********************************************************************************
    * @fn          halMcuWaitUs
    *
    * @brief       Busy wait function. Waits the specified number of microseconds. Use
    *              assumptions about number of clock cycles needed for the various
    *              instructions. The duration of one cycle depends on MCLK. In this HAL
    *              , it is set to 8 MHz, thus 8 cycles per usec.
    *
    *              NB! This function is highly dependent on architecture and compiler!
    *
    * @param       uint16 usec - number of microseconds delay
    *
    * @return      none
    */
    
    #pragma optimize=none
    void halMcuWaitUs(uint16 usec) // 5 cycles for calling
    {
        // The least we can wait is 3 usec:
        // ~1 usec for call, 1 for first compare and 1 for return
        while(usec > 3)       // 2 cycles for compare
        {                // 2 cycles for jump
            NOP();       // 1 cycles for nop
            NOP();       // 1 cycles for nop
            NOP();       // 1 cycles for nop
            NOP();       // 1 cycles for nop
            NOP();       // 1 cycles for nop
            NOP();       // 1 cycles for nop
            NOP();       // 1 cycles for nop
            NOP();       // 1 cycles for nop
            usec -= 2;        // 1 cycles for optimized decrement
        }
    }                         // 4 cycles for returning
    
    /***********************************************************************************
    * @fn          halMcuWaitMs
    *
    * @brief       Busy wait function. Waits the specified number of milliseconds. Use
    *              assumptions about number of clock cycles needed for the various
    *              instructions.
    *
    *              NB! This function is highly dependent on architecture and compiler!
    *
    * @param       uint16 millisec - number of milliseconds delay
    *
    * @return      none
    */
    #pragma optimize=none
    void halMcuWaitMs(uint16 msec)
    {
        while(msec-- > 0)
        {
            halMcuWaitUs(1000);
        }
    }

  • Hi TER,

    I am using a CC1120 and implemented the Digital Readout temperature detection algorithm as suggested in Appendix A of SWRA415B – CC112X/CC120X On-Chip Temperature Sensor, and I have looked at your code snippets. I have a problem, however, as my results are higher than expected. A digital IR thermometer gives me a surface reading of 29-30 degrees C, but the returned values from the CC1120 are:

    ADCValue_I = 394254

    ADCValue_Q = 9408

    I don't know what to expect beyond the datasheet's:

    VDD - 3 V
    Typical readout data @ 0°C  = -2059
    Typical readout data @ 25°C  = 19874

    I have done no calibration - these are just the raw values with VDD = 2V8 - but I'm not sure what these values are supposed to mean.

    The CC1120 config is as suggested:

    CC112x_DCFILT_CFG = 0x40
    CC112x_CHAN_BW = 0x88
    CC112x_MDMCFG1 = 0x47
    CC112x_FREQ_IF_CFG = 0x00
    CC112x_ATEST = 0x2A
    CC112x_ATEST_MODE = 0x07
    CC112x_GBIAS1 = 0x07
    CC112x_PA_IFAMP_TEST = 0x01

    Perhaps you can help me with some of the following: What values should I be expecting? How can I calibrate a sensor? What should I do to read values to convert them into temperature values? Have I even set the registers correctly?

    I'm sure I've missed something obvious. Any help would be appreciated. 

  • If you have implemented the digital readout correctly the ADCValue_Q should be zero. Are you sure that you enter debug mode?

  • Both ADCValue_I and ADCValue_Q are zero for me and the CHFILT_STARTUP_VALID in CHFILT_I2 is set.

    How do I know that we are in debug mode? MARC state? waht value in this case? 

  • Well, I don't seem to be in debug mode then, as I am still getting  non-zero ADCValue_Q values - I know very little about debug mode on the CC1120. As per the notes I am writing the following:

    u8 txBuffer[18] = {0x0F,0x28,0x02,0x90,0x42,0x1B,0x7E,0x1F,0xFE,0xCD,0x06,0x1B,0x0E,0xA1,0x0E,0xA4,0x00,0x3F};
    chipconWriteRegister(0x40, CC112x_DCFILT_CFG);
    chipconWriteRegister(0x88, CC112x_CHAN_BW);
    chipconWriteRegister(0x47, CC112x_MDMCFG1);
    chipconWriteRegister(0x85, CC112x_MDMCFG0);
    
    chipconWriteRegister(0x00, CC112x_FREQ_IF_CFG);
    chipconWriteRegister(0x2A, CC112x_ATEST);
    chipconWriteRegister(0x07, CC112x_ATEST_MODE);
    chipconWriteRegister(0x07, CC112x_GBIAS1);
    chipconWriteRegister(0x01, CC112x_PA_IFAMP_TEST);
    
    (void)writeToFIFO(txBuffer, CC112x_TXFIFO | WRITE_BURST, 18);
    chipconWriteRegister(0x01, CC112x_BIST);
    chipconWriteByte(CC112x_SIDLE);
    
    chipconWriteRegister(0x1F, CC112x_WOR_EVENT0_LSB);
    chipconWriteByte(CC112x_SXOFF);

    I am in RX mode. Are there other config items I need to have set by this point? I have tried writing all the config items you mentioned in your example - to no apparent effect, maybe because they are more for the CC1200. Do you by any chance have a verified set of config variables for use on the CC1120, such as those in the previous example? The example in the notes is incomplete.

  • David, it could look like you forgot to strobe SRX before writing to the TXFIFO. Note that the code in the app note contain a weakness, you should check that the chip actually is in Rx before writing to the FIFO (see the CC1200 code how it's done)

  • Hi Ter,

    Strobing the SRX just before writing to the TXFIFO is doing something. Not that this changes the state - I was in RX before that, but my values have changed:

    06:20:53,NFO,temperature I = 12066, Q = 521282
    06:21:06,NFO,temperature I = 12060, Q = 62
    06:21:19,NFO,temperature I = 12016, Q = 522594
    06:21:32,NFO,temperature I = 12174, Q = 523838
    06:21:45,NFO,temperature I = 12198, Q = 523478
    06:21:58,NFO,temperature I = 12088, Q = 524116
    06:22:11,NFO,temperature I = 12232, Q = 521504
    06:22:24,NFO,temperature I = 12260, Q = 523954
    06:22:37,NFO,temperature I = 12256, Q = 192

    And the calibration appears to work. Q is still all over the place. You mentioned that it should be 0. Should I be doing something to fix this?

    Now let me get a heat gun...

  • If you get something that looks like it's proportional to temp on the I output I wouldn't worry about the Q output. Setting  MDMCFG1.SINGLE_ADC_EN=1 turns off the Q path and when I have done measurements setting this bit causes the Q results to be 0. You can try this in normal packet receive also, set the bit and see if you get data in just I or both.

  • Hi David,

    Use the coeficients from this thread http://e2e.ti.com/support/wireless_connectivity/f/156/t/341902.aspx instead of the ones in the datasheet (tey are wrong).

    Good luck

  • Hi again,

    Could you post your implementation of writeToFIFO() function?

    Ithing that where my error is....

    You could visit my thread @http://e2e.ti.com/support/wireless_connectivity/f/156/t/341902.aspx

    We're going for the analog reading but,,,, it really bothers me that I didn't get a valid reading...

    Really appreciate it, thanx :)

  • mine just does this:

    void WriteTxFifo(uint8_t *pData, uint16_t len)
    {
        SpiBurstWrite(CC1200_BURST_TXFIFO, pData, len);
    }

    where SpiBurstWrite in essence just writes:

    USART_SpiTransfer(USART2, CC1200_EXTENDED_REGS_START | RADIO_WRITE_ACCESS | RADIO_BURST_ACCESS);
    USART_SpiTransfer(USART2, addrLow);

    and then the data.

    .... but I still don't know if mine is working (busy doing other stuff)

  • I've noticed that you set CC120X_CHAN_BW=0x88...

    In the example header file sent by TER it set to 0x01...

    But since you have a reading I guess It's not important 

  • Thx for the suggested coefficients, 

    Can any of you guys, that actually have it working, take a quick look at my ADC values, do they look OK after all?

    (I tried on two boards, and got the following results.)

    /*
    ADCValue_I

    Item 1
    @ ~ 70 deg C : 185
    @ ~ 22 deg C : 46 

    Item 2
    @ ~ 70 deg C : 217
    @ ~ 22 deg C : 88

    */

    thx in advance

    EDIT:

    Or are the swra415b typical values correct :

    VDD - 3 V
    Typical readout data @ 0°C -2059
    Typical readout data @ 25°C 19874

  • 0x01 !?!?!??!

    The swra415b datasheet explicitly says:

    CHAN_BW        0x88 Bypass channel filter

    ???

  • I know... but he example code TER (a TI-engeneer) have posted in this thread (and my thread)... see a couple of posts earlier....

    says 0x01.... I'm confused

  • My thread is found @ http://e2e.ti.com/support/wireless_connectivity/f/156/t/341902.aspx

  • The temperature  sensor on CC1120 and CC1200 is equal but CC1120 and CC1200 are not fully register compatible. Some of the bit fields required have moved  from CC1120 to CC1200.

    Short overview over what the code does:

    The analog readout from the temp sens is routed to the input of the IF_ADC. Due to how the system is implemented the chip has to be in debug mode to be able to turn off the IFAMP. This is required to avoid this driving the input of the ADC. The chip has to be in Rx to turn on the ADC. Since the result is a DC value the DC filter has to be turned off.

    Due to the register bit field mapping two registers are different between CC1120 and CC1200, in the tables below colored in orange.

    CC1120:

    Register

    Value

    Comment

    DCFILT_CFG

    0x40

    Turn off DC filtering

    CHAN_BW

    0x88

    Bypass channel filter

    MDMCFG1

    0x47

    Single ADC on, I channel

    FREQ_IF_CFG

    0x00

    Zero IF

    ATEST 

    0x2A

    Temp sensor on

    ATEST_MODE   

    0x07

    Temp sensor on

    GBIAS1    

    0x07

    Temp sensor on

    PA_IFAMP_TEST

    0x01

    Route voltage into the ADC

    CC1200:

    Register

    Value

    Comment

    DCFILT_CFG

    0x40

    Turn off DC filtering

    MDMCFG0       0x85

    Bypass channel filter

    MDMCFG1

    0x47

    Single ADC on, I channel

    IF_MIX_CFG

    0x00

    Zero IF

    ATEST 

    0x2A

    Temp sensor on

    ATEST_MODE   

    0x07

    Temp sensor on

    GBIAS1    

    0x07

    Temp sensor on

    PA_IFAMP_TEST

    0x01

    Route voltage into the ADC

  • Thx for reply and attached code.

    The example-code verifies that  marc state is 0x6D (RX,RX) before run_MARC_debug. My code also passes that check.

    The example-code also reads marc state afterwards. But does not check value.
    My board says 0x5F which is (IDLE , RESERVED)

    What is correct Marc state after run_MARC_debug?

  • My code returns 0x5F too. The last MARC state checked should have been removed from the code before publishing since it's note used, I just had it included in the code for debugging at one point.

    We are going to make a (hopefully) better code example.

  • So: I had my own register-set, that I patched with the 8 mentioned values. That gave wrong results.

    I changed to reset chip, write your 'preferredSettings' + all the other run_MARC_debug stuff.
    Now I get:

    @22 deg C : ~ 40000

    @60 deg C : ~ 60000

    That looks correct, right ?

    (regarding marc state : for an example code its fine to have an extra reading of marc state, but please add a check of the expected value, so everyone knows they are on the right track.)

  • Thank you TER and Yassin! I managed to produce an acceptable temperature curve yesterday, calibrated using the incorrect temperature coefficients (VDD = 2V8) but still not too bad for a proof of concept. Even though I was in RX mode, strobing the SRX just before writing to the TXFIFO was the ticket. When I get back to the project again I will confirm calibration and other parameters.

    @Yassin: Do you still have a question about the implementation of writeToFIFO() function?

    @T Thomsen: Sounds about right, but what is your VDD?

  • Naah ...
    ... from app-note:

    VDD - 2 V - Typical readout data @ 25°C 21047
    VDD - 3 V - Typical readout data @ 25°C 19874
    VDD - 3.6 V - Typical readout data @ 25°C 19133

    If thats correct , I shouldn't get values around 40.000 @ room temperature

    Are you close to the value from app note?

  • Doh! I read wrong - but maybe the calibration is way out? Anyway, with VDD = 2V8, I got a value of 12154 at 30 deg C, so mine varies quite dramatically from the datasheet.

    I haven't done enough close examination of the calibration, and only took the device to 40 def C briefly with a heat gun, not an oven.

  • From my measurements I got a sample that gave out about 12000 at room temp. It's fairly easy to see if it behaves like a temp sens, just put your finger on top of the chip (beware of ESD)

  • Hello all,

    I tried to test the temperature sensor in CC1120 by using the digital readout. I was taking digital readouts over a range of temperatures using the code provided. The digital readouts (in hex) are usually around 0x00xxxx (room temperature and above), but for lower temperature values below 10-12C, the values are around 0x07xxxx. These values when used in the formula mentioned in the app. note DN403, gives values above 100C.

    Could you please tell what is going wrong?

  • One detail that is not covered in the app note: The output of the ADC is in two's complement, below around 0 to 10 degrees the ADC will wrap around 0.    

  • Sorry, I've been buzy with other stuff the last couple of days.... We're looking into the analog setup since it does not require to shutdown the cristal (a bit problematic for our application). The analog setup is straight forward.

    But still, I would like to get it to work (at least to compare both readings). I still have som problems with the writeToFIFO() function. Could you post your SpiBurstWrite() function? 

     

    Thanx :)

  • The code I have written in based on the easy link example here: http://www.ti.com/lit/zip/swrc253, I have just sat different registers and rewritten the Rx.