CC2652R7: Capturing pulses at the same time but one pulse interrupt gets dropped.

Part Number: CC2652R7

Tool/software:

Hello,

I am using the GPT timer to capture a pulse width. Two timers are being involved I set up both GPTTImers to capture both edges of the pulse and then I calculated the delta of the first edge and second edge. I have a TX line that will be enabled after both timers are set up. The Tx line is going to two identical capacitors, with the ends of each capacitor going to different rx gpios. Since the signal of the RX is the same, the generated interrupts should happen simultaneously, but it seems like only one interrupt is actually being generated, not both.

Thanks,
Kenneth T.

  • Hello Kenneth,

    Would you be able to provide a basic code file which demonstrates your GPTimer setup and could help us replicate the issue you're describing?  Is the same GPTimer interrupt called, or can it vary between the two?  If one is disabled then will the other interrupt always be serviced?  Does the same behavior occur if using 3.3V power supply levels?

    Are you using the TI Driver, driverlib, or direct hardware register access?  What can you gather by debugging the register interrupt status of your timers?  Also, what version of the F2 SDK are you evaluating?

    Regards,
    Ryan

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    vector<GPTimerCC26XX_Handle> gptimer_handles(2);
    for (size_t t = 0; t < 2; t++)
    {
    // Configure GPTimer for edge time capture
    GPTimerCC26XX_Params gptimer_params;
    GPTimerCC26XX_Params_init(&gptimer_params);
    gptimer_params.width = GPT_CONFIG_16BIT;
    gptimer_params.mode = GPT_MODE_EDGE_TIME;
    gptimer_params.matchTiming = GPTimerCC26XX_SET_MATCH_NEXT_CLOCK;
    gptimer_params.direction = GPTimerCC26XX_DIRECTION_UP;
    gptimer_params.debugStallMode = GPTimerCC26XX_DEBUG_STALL_OFF;
    // Open GPTimer and set argument to "this" object for callback to use
    GPTimerCC26XX_Handle gptimer_handle = GPTimerCC26XX_open(t, &gptimer_params);
    gptimer_handles[t] = gptimer_handle;
    GPTimerCC26XX_setArg(gptimer_handle, this);
    // Configure Gpio for edge interrupt
    if (t == 0)
    {
    gpio.configure(Gpio::PinId::DIO_16, Gpio::Direction::INPUT, Gpio::Pull::NONE, Gpio::State::NONE, Gpio::Strength::NONE, GPTimerCC26XX_getPinMux(gptimer_handle));
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    void Timer::gptimerCallback(GPTimerCC26XX_Handle gptimer_handle, GPTimerCC26XX_IntMask interruptMask)
    {
    // Capture edge value
    Timer* timer = reinterpret_cast<Timer*>(GPTimerCC26XX_getArg(gptimer_handle));
    if (timer->_edge_count == 0)
    {
    timer->_first_edge_gpt = GPTimerCC26XX_getValue(gptimer_handle);
    timer->_first_edge_sem.post();
    }
    else if (timer->_edge_count == 1)
    {
    timer->_second_edge_gpt = GPTimerCC26XX_getValue(gptimer_handle);
    timer->_second_edge_sem.post();
    }
    timer->_edge_count++;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    Two different GPTimer interrupts are called, INT_GPT2A and INT_GPT3A. If we disable one the other will be serviced but both will not be serviced at the same time. We're using the TI Driver GPTimerCC26XX.h. I haven't tested it with a 3.3V power supply level however using IntPendGet() I was able to verify that the interrupt was happening however it was never being serviced. I am using version simplelink_cc13xx_cc26xx_sdk_7_41_00_17