CC1310: Issue with LMT01 Pulse Counting on CC1310F128RGZ Using GPIO Interrupt and Timer

Part Number: CC1310
Other Parts Discussed in Thread: LMT01, ,

Tool/software:

Hello,

I am using a TI CC1310F128RGZ microcontroller to interface with the LMT01 temperature sensor. I am attempting to count pulses using a GPIO falling edge interrupt, but I am not getting an accurate count.

I also tried using a timer to measure the pulse width, but I encountered a limitation where the timer does not work properly below 11 microseconds.

Has anyone faced a similar issue or found a workaround? Any suggestions on how to achieve accurate pulse counting for the LMT01 sensor on the CC1310 would be greatly appreciated.

Thanks in advance!

  • Hi Arvind,

    I believe that in order to interface with the LMT01, you should use the CC1310 GPTimer in "Edge count up" mode:

    This will result in an counting mechanism that does not strain the main CPU with unnecessary interrupts. I will point to you to the Timer driver documentation as well: https://dev.ti.com/tirex/explore/content/simplelink_cc13x0_sdk_4_20_02_07/docs/tidrivers/doxygen/html/_g_p_timer_c_c26_x_x_8h.html

    Else, you have also access to some example code on how to do that there:

    Regards,

    Arthur

  • Hi Arthur,

    I have tried using GPTimer, but it does not give the correct count. This is my code.

    Lmt01.c
    #include <unistd.h>
    #include <stdint.h>
    #include <stddef.h>
    
    /* TI Driver Header files */
    #include <ti/drivers/GPIO.h>
    #include <ti/drivers/timer/GPTimerCC26XX.h>
    #include <ti/devices/cc13x0/driverlib/ioc.h>
    #include <ti/sysbios/knl/Task.h>
    #include <xdc/runtime/System.h>
    #include <ti/sysbios/hal/Hwi.h>
    #include <ti/sysbios/knl/Clock.h>
    #include "ti_drivers_config.h"
    
    GPTimerCC26XX_Handle hTimer;
    GPTimerCC26XX_Params timerParams;
    
    volatile uint32_t pulseTimePrev = 0;
    volatile uint32_t pulseTimeCurr = 0;
    volatile uint32_t pulseCount = 0;
    volatile bool counting = false;
    
    /* Timer Capture Interrupt Callback */
    void timerCallback(GPTimerCC26XX_Handle handle, GPTimerCC26XX_IntMask interruptMask) {
        if (!counting) return;  // Ignore if not in counting phase
    
        pulseTimePrev = pulseTimeCurr;
        pulseTimeCurr = GPTimerCC26XX_getValue(handle);
    
        System_printf("⚡ Interrupt Triggered! Timer Value: %u\n", pulseTimeCurr);
        System_flush();
    
        if (pulseTimePrev > 0) {
            uint32_t pulseWidth = pulseTimeCurr - pulseTimePrev;
    
    //        if (pulseWidth >= 480 && pulseWidth <= 550) {  // ✅ 11µs pulse width (48MHz clock)
                pulseCount++;
    //        }
        }
    }
    
    /* Initialize and Configure GPTimer for Pulse Capture */
    void initPulseCapture() {
        GPTimerCC26XX_Params_init(&timerParams);
        timerParams.mode = GPT_MODE_EDGE_TIME;  // ✅ Use Capture Mode
        timerParams.width = GPT_CONFIG_16BIT;
        timerParams.direction = GPTimerCC26XX_DIRECTION_UP;
        timerParams.debugStallMode = GPTimerCC26XX_DEBUG_STALL_OFF;
    
        hTimer = GPTimerCC26XX_open(CONFIG_GPTIMER_0, &timerParams);
        if (hTimer == NULL) {
            System_printf("❌ Error: Failed to open GPTimer\n");
            System_flush();
            return;
        }
    
        // ✅ Properly Map IOID_13 to GPTimer
        GPTimerCC26XX_PinMux pinMux = GPTimerCC26XX_getPinMux(hTimer);
        IOCPortConfigureSet(IOID_13, pinMux, IOC_STD_INPUT);
    
        // ✅ Register Timer Interrupt
        GPTimerCC26XX_registerInterrupt(hTimer, timerCallback, GPT_INT_CAPTURE);
        System_printf("✅ Timer interrupt registered!\n");
        System_flush();
    
        // ✅ Enable NVIC Interrupt
        Hwi_enableInterrupt(INT_AON_GPIO_EDGE);
        System_printf("✅ NVIC Interrupt Enabled!\n");
        System_flush();
    
        // ✅ Capture Both Rising and Falling Edges
        GPTimerCC26XX_setCaptureEdge(hTimer, GPTimerCC26XX_NEG_EDGE);
    
        // ✅ Start Timer
        GPTimerCC26XX_start(hTimer);
        System_printf("✅ GPTimer started!\n");
        System_flush();
    }
    
    /* Start Counting Pulses After 50ms HIGH Phase */
    void startPulseCounting() {
        pulseCount = 0;  // Reset count
    
        System_printf("🔄 Waiting for 50ms HIGH phase...\n");
        System_flush();
        Task_sleep(50 * 1000 / Clock_tickPeriod);  // ✅ Wait for 50ms HIGH Phase
    
        System_printf("✅ 50ms HIGH phase ended. Starting 54ms pulse count...\n");
        System_flush();
    
        counting = true;  // ✅ Enable pulse counting
        Task_sleep(54 * 1000 / Clock_tickPeriod);  // ✅ Count pulses for 54ms
    
        counting = false;  // ✅ Stop counting
        System_printf("✅ Pulse Count Complete: %u pulses\n", pulseCount);
        System_flush();
    }
    
    void *mainThread(void *arg0) {
        GPIO_init();
        initPulseCapture();  // ✅ Use GPTimer in Capture Mode
    //    GPIO_setConfig(IOID_14, GPIO_CFG_OUTPUT | GPIO_CFG_OUT_HIGH ); // Configure as output, start low
    
    //    GPIO_write(IOID_14, 0);
    
        while (1) {
    //        GPIO_write(IOID_14, 1);
            startPulseCounting();  // ✅ Wait 50ms HIGH + Count Pulses for 54ms
    //        GPIO_write(IOID_14, 0);
            sleep(1);
        }
    }
    

    Please check the code and suggest what changes I should make or what I should do to fix the issue.

  • Hi Arvind,

    How incorrect is the count?

    You should not wait exactly 54 mS, as you will miss some pulses. You should instead wait for at least 60mS to make sure that you catch the pulse train.

    Regards,

    Arthur

  • Hello Arthur,

    I tried 47, 54, 60, 70, and 80 ms, but the output remained the same.

  • Hi Arthur,

    The number of pulses is always between 118 and 122.

  • Arvind,

    How is the LMT01 wired to the CC1310? Can you post a schematic?

    Regards,

    Arthur

  • Hi Arthur,

    R16 is connected, but R17 is not. I also tried it on the LAUNCHXL-CC1310 board and with an external sensor circuit. The circuit is the same as mentioned in the schematic.

      

  • Hi arvind,

    Now that I think about it, what about the prescaler value? Can you show me how it is configured in the TnPR register view?

    Regards,

    Arthur

  • timer Register.txt
    	GPT0		General Purpose Timer.	
    	CFG			0x00000004	Configuration [Memory Mapped]	
    	TAMR		0x00000017	Timer A Mode   [Memory Mapped]	
    	TBMR		0x00000000	Timer B Mode   [Memory Mapped]	
    	CTL			0x00000004	Control [Memory Mapped]	
    	SYNC		0x00000000	Synch Register   [Memory Mapped]	
    	IMR			0x00000004	Interrupt Mask This register is used to enable the interrupts. Associated registers: RIS, MIS, ICLR   [Memory Mapped]	
    	RIS			0x00000000	Raw Interrupt Status Associated registers: IMR, MIS, ICLR   [Memory Mapped]	
    	MIS			0x00000000	Masked Interrupt Status Values are result of bitwise AND operation between RIS and IMR Assosciated clear register: ICLR   [Memory Mapped]	
    	ICLR		0x00000000	Interrupt Clear This register is used to clear status bits in the RIS and MIS registers [Memory Mapped]	
    	TAILR		0x0000FFFF	Timer A Interval Load  Register [Memory Mapped]	
    	TBILR		0x0000FFFF	Timer B Interval Load  Register [Memory Mapped]	
    	TAMATCHR	0x0000FFFF	Timer A Match Register  Interrupts can be generated when the timer value is equal to the value in this register in one-shot or periodic mode.  In Edge-Count mode, this register along with TAILR, determines how many edge events are counted. The total number of edge events counted is equal to the value in TAILR minus this value.  Note that in edge-count mode, when executing an up-count, the value of TAPR and TAILR must be greater than the value of TAPMR and this register.  In PWM mode, this value along with TAILR, determines the duty cycle of the output PWM signal.  When a 16/32-bit GPT is configured to one of the 32-bit modes, TAMATCHR appears as a 32-bit register. (The upper 16-bits correspond to the contents TBMATCHR).  In a 16-bit mode, the upper 16 bits of this register read as 0s and have no effect on the state of TBMATCHR.  Note : This register is updated internally (takes effect) based on TAMR.TAMRSU  [Memory Mapped]	
    	TBMATCHR	0x0000FFFF	Timer B Match Register   When a GPT is configured to one of the 32-bit modes, the contents of bits 15:0 in this register are loaded into the upper 16 bits of  TAMATCHR. Reads from this register return the current match value of Timer B and writes are ignored. In a 16-bit mode, bits 15:0 are used for the match value. Bits 31:16 are reserved in both cases.  Note : This register is updated internally (takes effect) based on TBMR.TBMRSU [Memory Mapped]	
    	TAPR		0x00000000	Timer A Pre-scale This register allows software to extend the range of the timers when they are used individually. When in one-shot or periodic down count modes, this register acts as a true prescaler for the timer counter. When acting as a true prescaler, the prescaler counts down to 0 before the value in TAR and TAV registers are incremented. In all other individual/split modes, this register is a linear extension of the upper range of the timer counter, holding bits 23:16 in the 16-bit modes of the 16/32-bit GPT.   [Memory Mapped]	
    	TBPR		0x00000000	Timer B Pre-scale This register allows software to extend the range of the timers when they are used individually. When in one-shot or periodic down count modes, this register acts as a true prescaler for the timer counter. When acting as a true prescaler, the prescaler counts down to 0 before the value in TBR and TBV registers are incremented. In all other individual/split modes, this register is a linear extension of the upper range of the timer counter, holding bits 23:16 in the 16-bit modes of the 16/32-bit GPT.   [Memory Mapped]	
    	TAPMR		0x00000000	Timer A Pre-scale Match This register allows software to extend the range of the TAMATCHR when used individually.     [Memory Mapped]	
    	TBPMR		0x00000000	Timer B Pre-scale Match This register allows software to extend the range of the TBMATCHR when used individually.     [Memory Mapped]	
    	TAR			0x00000000	Timer A Register This register shows the current value of the Timer A counter in all cases except for Input Edge Count and Time modes. In the Input Edge Count mode, this register contains the number of edges that have occurred. In the Input Edge Time mode, this register contains the time at which the last edge event took place.  When a GPT is configured to one of the 32-bit modes, this register appears as a 32-bit register (the upper 16-bits correspond to the contents of the Timer B (TBR) register). In the16-bit Input Edge Count, Input Edge Time, and PWM modes, bits 15:0 contain the value of the counter and bits 23:16 contain the value of the prescaler, which is the upper 8 bits of the count. Bits 31:24 always read as 0. To read the value of the prescaler in 16-bit One-Shot and Periodic modes, read bits [23:16] in the TAV register. To read the value of the prescalar in periodic snapshot mode, read the Timer A Prescale Snapshot (TAPS) register.  [Memory Mapped]	
    	TBR			0x0000FFFF	Timer B Register This register shows the current value of the Timer B counter in all cases except for Input Edge Count and Time modes. In the Input Edge Count mode, this register contains the number of edges that have occurred. In the Input Edge Time mode, this register contains the time at which the last edge event took place.  When a GPTM is configured to one of the 32-bit modes, the contents of bits 15:0 in this register are loaded into the upper 16 bits of the TAR register. Reads from this register return the current value of Timer B. In a 16-bit mode, bits 15:0 contain the value of the counter and bits 23:16 contain the value of the prescaler in Input Edge Count, Input Edge Time, and PWM modes, which is the upper 8 bits of the count. Bits 31:24 always read as 0. To read the value of the prescaler in 16-bit One-Shot and Periodic modes, read bits [23:16] in the TBV register. To read the value of the prescalar in periodic snapshot mode, read the Timer B Prescale Snapshot (TBPS) register.  [Memory Mapped]	
    	TAV			0x00000000	Timer A Value  When read, this register shows the current, free-running value of Timer A in all modes. Softwarecan use this value to determine the time elapsed between an interrupt and the ISR entry when using the snapshot feature with the periodic operating mode. When written, the value written into this register is loaded into the TAR register on the next clock cycle.  When a 16/32-bit GPTM is configured to one of the 32-bit modes, this register appears as a 32-bit register (the upper 16-bits correspond to the contents of the GPTM Timer B Value (TBV) register). In a 16-bit mode, bits 15:0 contain the value of the counter and bits 23:16 contain the current, free-running value of the prescaler, which is the upper 8 bits of the count in Input Edge Count, Input Edge Time, PWM and one-shot or periodic up count modes. In one-shot or periodic down count modes, the prescaler stored in 23:16 is a true prescaler, meaning bits 23:16 count down before decrementing the value in bits 15:0. The prescaler in bits 31:24 always reads as 0. [Memory Mapped]	
    	TBV			0x0000FFFF	Timer B Value  When read, this register shows the current, free-running value of Timer B in all modes. Software can use this value to determine the time elapsed between an interrupt and the ISR entry. When written, the value written into this register is loaded into the TBR register on the next clock cycle.  When a 16/32-bit GPTM is configured to one of the 32-bit modes, the contents of bits 15:0 in this register are loaded into the upper 16 bits of the TAV register. Reads from this register return the current free-running value of Timer B. In a 16-bit mode, bits 15:0 contain the value of the counter and bits 23:16 contain the current, free-running value of the prescaler, which is the upper 8 bits of the count in Input Edge Count, Input Edge Time, PWM and one-shot or periodic up count modes. In one-shot or periodic down count modes, the prescaler stored in 23:16 is a true prescaler, meaning bits 23:16 count down before decrementing the value in bits 15:0. The prescaler in bits 31:24 always reads as 0. [Memory Mapped]	
    	TAPS		0x00000000	Timer A Pre-scale Snap-shot   Based on the value in the register field TAMR.TAILD, this register is updated with the value from TAPR register either on the next cycle or on the next timeout.   This register shows the current value of the Timer A pre-scaler in the 16-bit mode.  [Memory Mapped]	
    	TBPS		0x00000000	Timer B Pre-scale Snap-shot   Based on the value in the register field TBMR.TBILD, this register is updated with the value from TBPR register either on the next cycle or on the next timeout.  This register shows the current value of the Timer B pre-scaler in the 16-bit mode. [Memory Mapped]	
    	TAPV		0x00000000	Timer A Pre-scale Value  This register shows the current value of the Timer A free running pre-scaler in the 16-bit mode. [Memory Mapped]	
    	TBPV		0x00000000	Timer B Pre-scale Value  This register shows the current value of the Timer B free running pre-scaler in the 16-bit mode. [Memory Mapped]	

    Hi Arthur,

    The GPTimer register values are mentioned in the text file. Please check.

  • Hi Arvind,

    After looking at your code again, I believe you should instead do the following:

    1. Start the count as you do already, wait 60mS. Do not count in the interrupt, or do any sort of processing.
    2. Once the 60 mS have elapsed, get the value using  GPTimerCC26XX_getValue.

    Regards,

    Arthur

  • Lmt01_GPTimerCC26XX_getValue.c
    #include <unistd.h>
    #include <stdint.h>
    #include <stddef.h>
    #include <stdio.h>
    
    /* TI Driver Header Files */
    #include <ti/drivers/GPIO.h>
    #include <ti/drivers/timer/GPTimerCC26XX.h>
    #include <ti/devices/cc13x0/driverlib/ioc.h>
    #include <ti/sysbios/knl/Task.h>
    #include <xdc/runtime/System.h>
    #include <ti/sysbios/knl/Clock.h>
    #include "ti_drivers_config.h"
    
    /* Board Header files */
    #include "Board.h"
    
    /* Global Variables */
    GPTimerCC26XX_Handle hTimer;
    GPTimerCC26XX_Params timerParams;
    
    volatile uint32_t pulseTimePrev = 0;
    volatile uint32_t pulseTimeCurr = 0;
    
    /* Timer Capture Interrupt Callback */
    void timerCallback(GPTimerCC26XX_Handle handle, GPTimerCC26XX_IntMask interruptMask) {
        pulseTimePrev = pulseTimeCurr;
        pulseTimeCurr = GPTimerCC26XX_getValue(handle);
    }
    
    /* Initialize GPTimer for Pulse Capture */
    void initPulseCapture() {
        GPTimerCC26XX_Params_init(&timerParams);
        timerParams.mode = GPT_MODE_EDGE_TIME;  // Capture Mode
        timerParams.width = GPT_CONFIG_16BIT;
        timerParams.direction = GPTimerCC26XX_DIRECTION_UP;
        timerParams.debugStallMode = GPTimerCC26XX_DEBUG_STALL_OFF;
    
        hTimer = GPTimerCC26XX_open(CONFIG_GPTIMER_0, &timerParams);
        if (hTimer == NULL) {
            System_printf("❌ Error: GPTimer Open Failed\n");
            System_flush();
            return;
        }
    
        // Map IOID_13 to GPTimer
        GPTimerCC26XX_PinMux pinMux = GPTimerCC26XX_getPinMux(hTimer);
        IOCPortConfigureSet(IOID_13, pinMux, IOC_STD_INPUT);
        System_printf("✅ IOID_13 Mapped to GPTimer\n");
        System_flush();
    
        // Register Timer Interrupt
        GPTimerCC26XX_registerInterrupt(hTimer, timerCallback, GPT_INT_CAPTURE);
        System_printf("✅ Timer Interrupt Registered\n");
        System_flush();
    
        // Capture on Both Edges (For More Accurate Counting)
        GPTimerCC26XX_setCaptureEdge(hTimer, GPTimerCC26XX_BOTH_EDGES);
    
        // Start Timer
        GPTimerCC26XX_start(hTimer);
        System_printf("✅ GPTimer Started!\n");
        System_flush();
    }
    
    /* Pulse Counting Routine */
    void pulseCountingRoutine() {
        uint32_t pulseCount = 0;  // Reset pulse count
    //    GPIO_write(Board_GPIO_BTN2, 1); // Set BTN2 high
        // Wait for 50ms before starting count
        Task_sleep(50 * 1000 / Clock_tickPeriod);
    
        // Start Counting for 60ms
        uint32_t startValue = GPTimerCC26XX_getValue(hTimer);
        Task_sleep(60 * 1000 / Clock_tickPeriod);
        uint32_t endValue = GPTimerCC26XX_getValue(hTimer);
    
        // Calculate pulses counted
        pulseCount = endValue - startValue;
    //    GPIO_write(Board_GPIO_BTN2, 0); // Set BTN2 Low
        // Print the final pulse count
        System_printf("🔄 Pulse Count in 60ms: %u pulses\n", pulseCount);
        System_flush();
    }
    
    /* Main Thread */
    void *mainThread(void *arg0) {
        GPIO_init();
        initPulseCapture();  // Initialize GPTimer
        // Initialize GPIO for BTN2
    //    GPIO_setConfig(Board_GPIO_BTN2, GPIO_CFG_OUTPUT | GPIO_CFG_OUT_HIGH); // Configure as output, start low
    //    GPIO_write(Board_GPIO_BTN2, 0); // Set BTN2 Low
    
        while (1) {
            pulseCountingRoutine();  // Run Pulse Counting Routine
        }
    }
    

    Hi Arthur,

    I tried, but it did not count the pulses accurately. I have also attached the code. Please check.

  • Hi Arvind,

    Are you getting the same 118 - 122 value this time too? Note that you are still in GPT_MODE_EDGE_TIME:



    You need to be in GPT_MODE_EDGE_COUNT in order to count the edges.

    Regards,

    Arthur

  • Lmt01_Gptimer_pulses_2220.c
    #include <unistd.h>
    #include <stdint.h>
    #include <stddef.h>
    #include <stdio.h>
    
    /* TI Driver Header Files */
    #include <ti/drivers/GPIO.h>
    #include <ti/drivers/timer/GPTimerCC26XX.h>
    #include <ti/devices/cc13x0/driverlib/ioc.h>
    #include <ti/sysbios/knl/Task.h>
    #include <xdc/runtime/System.h>
    #include <ti/sysbios/knl/Clock.h>
    #include "ti_drivers_config.h"
    
    /* Board Header files */
    #include "Board.h"
    
    /* Global Variables */
    GPTimerCC26XX_Handle hTimer;
    GPTimerCC26XX_Params timerParams;
    
    volatile uint32_t pulseTimePrev = 0;
    volatile uint32_t pulseTimeCurr = 0;
    
    /* Timer Capture Interrupt Callback */
    void timerCallback(GPTimerCC26XX_Handle handle, GPTimerCC26XX_IntMask interruptMask) {
        pulseTimePrev = pulseTimeCurr;
        pulseTimeCurr = GPTimerCC26XX_getValue(handle);
    }
    
    /* Initialize GPTimer for Pulse Capture */
    void initPulseCapture() {
        GPTimerCC26XX_Params_init(&timerParams);
        timerParams.mode = GPT_MODE_EDGE_COUNT;  // Capture Mode
        timerParams.width = GPT_CONFIG_16BIT;
        timerParams.direction = GPTimerCC26XX_DIRECTION_UP;
        timerParams.debugStallMode = GPTimerCC26XX_DEBUG_STALL_OFF;
    
        hTimer = GPTimerCC26XX_open(CONFIG_GPTIMER_0, &timerParams);
        if (hTimer == NULL) {
            System_printf("❌ Error: GPTimer Open Failed\n");
            System_flush();
            return;
        }
    
        // Map IOID_13 to GPTimer
        GPTimerCC26XX_PinMux pinMux = GPTimerCC26XX_getPinMux(hTimer);
        IOCPortConfigureSet(IOID_13, pinMux, IOC_STD_INPUT);
        System_printf("✅ IOID_13 Mapped to GPTimer\n");
        System_flush();
    
        // Register Timer Interrupt
        GPTimerCC26XX_registerInterrupt(hTimer, timerCallback, GPT_INT_CAPTURE);
        System_printf("✅ Timer Interrupt Registered\n");
        System_flush();
    
        // Capture on Both Edges (For More Accurate Counting)
        GPTimerCC26XX_setCaptureEdge(hTimer, GPTimerCC26XX_BOTH_EDGES);
    
        // Start Timer
        GPTimerCC26XX_start(hTimer);
        System_printf("✅ GPTimer Started!\n");
        System_flush();
    }
    
    /* Pulse Counting Routine */
    void pulseCountingRoutine() {
        uint32_t pulseCount = 0;  // Reset pulse count
        GPIO_write(Board_GPIO_BTN2, 1); // Set BTN2 high
        // Wait for 50ms before starting count
        Task_sleep(50 * 1000 / Clock_tickPeriod);
    
        // Start Counting for 60ms
        uint32_t startValue = GPTimerCC26XX_getValue(hTimer);
        Task_sleep(17 * 1000 / Clock_tickPeriod);
        uint32_t endValue = GPTimerCC26XX_getValue(hTimer);
    
        // Calculate pulses counted
        pulseCount = endValue - startValue;
        GPIO_write(Board_GPIO_BTN2, 0); // Set BTN2 Low
        // Print the final pulse count
        System_printf("🔄 Pulse Count in 60ms: %u pulses\n", pulseCount);
        System_flush();
    }
    
    /* Main Thread */
    void *mainThread(void *arg0) {
        GPIO_init();
        initPulseCapture();  // Initialize GPTimer
        // Initialize GPIO for BTN2
        GPIO_setConfig(Board_GPIO_BTN2, GPIO_CFG_OUTPUT | GPIO_CFG_OUT_HIGH); // Configure as output, start low
        GPIO_write(Board_GPIO_BTN2, 0); // Set BTN2 Low
    
        while (1) {
            pulseCountingRoutine();  // Run Pulse Counting Routine
        }
    }
    

    Hi Arthur,

    I tried using GPT_MODE_EDGE_COUNT in two cases:

    1. Continuous supply to the sensor – In this case, the pulse count is random, such as 2292, 2502, 53, 2493, 1080, etc.

    2. Supplying the sensor using GPIO pin 14 for a specific time period – The pulse count remains between 2200-2230 at ambient temperature.

    I have also attached my code. Please check.

  • Hi Arvind,

    Number 2 is the correct way to do it, and the results are too. You are getting twice the count because you count on both edge. If you divide it by two, you get ambient temperature values.

    Regards,

    Arthur

  • Hi Arthur,

    Based on the oscilloscope waveform, I set 17 ms for measurement. However, in reality, when the temperature varies, this time will also change, so I decided to adjust it accordingly.

  • Hi Arthur,

    I checked the temperature using a calibrated device, and there is a 6-degree difference in ambient conditions.

    • LMT01 sensor shows 19.9–20.1°C.

    • Calibrated device shows 26.7°C.

  • Based on the oscilloscope waveform, I set 17 ms for measurement. However, in reality, when the temperature varies, this time will also change, so I decided to adjust it accordingly.

    Indeed, the time varies according to the temperature, because the pulse train may or may not be longer. Please keep using a 60mS value, as you have suggested in solution number 2.

    checked the temperature using a calibrated device, and there is a 6-degree difference in ambient conditions.

    • LMT01 sensor shows 19.9–20.1°C.

    • Calibrated device shows 26.7°C.

    The LMT01, or the calibrated may be exposed to different temperature conditions, or sun exposure, which may explain the difference.

    Regards,

    Arthur

  • Hi Arthur,

    When I checked the LMT01 sensor output at different temperatures, the pulse counts were as follows:

    1. At 70°C, the pulse count is 1638–1645.

    2. At 79°C, the pulse count is 1768–1782.

  • Hi Arvind,

    Does your oscilloscope come with a pulse count feature? That would be very helpful in validating the count.

    If the counts happens to match with the CC1310 one, you can then switch on to the Sensors forum, after having been through the following document: https://www.ti.com/lit/pdf/snoa967

    Regards,

    Arthur