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.

CC2652R7: Sensor Controller GPIO trigger not working

Part Number: CC2652R7


Tool/software:

For our application, we are relying on using an incoming Digital signal to indicate a train of clicks.
The sensor controller is set up to run EventHandler A code when it detects a rising edge of this signal, but this Event Handler code is never executed, do you have any ideas why this might be?
We have tried this through Task Testing and through running in the MCU firmware build.
Details:
Task Testing shows no Event counter change
This image shows the task testing. We can see the GPIO is being manually pushed high and low. This is being detected in the execution code. We have an execution counter that we can see is rising. We have an event counter that remains at 0.
This means the event handler code is never being run. This proves that we have the right GPIO line because execution code is able to detect it changing.
Task testing sequence:


Initialisation code:

state.clickCount = 0;

state.inClickTrain = 0;

// Set up the first interrupt trigger

evhSetupGpioTrigger(0, AUXIO_I_CLICK_IN, 1, EVH_GPIO_TRIG_ON_EDGE);

// Schedule the next execution

fwScheduleTask(1);

Execution Code:

// For debug: copy the GPIO value to a state variable.

gpioGetInputValue(AUXIO_I_CLICK_IN; state.gpioVal);

// For debug: keep a running count of how many times the execution code has run.

state.execCount += 1;

/***** other logic ******/

// Schedule the next execution.

fwScheduleTask(1);

EventHandlerA code:

state.eventCount += 1;

// Set up the next interrupt trigger

evhSetupGpioTrigger(0, AUXIO_I_CLICK_IN, 1, EVH_GPIO_TRIG_ON_EDGE);

Task Event Handling Settings show GPIO Event Trigger ticked, and event 0 shall trigger Event Handler A code

  • Update:

    When we removed another task that is using 2 events, our task code is working. The other task uses only timer2 event triggers, not GPIO.

    My understanding is that because it is in a separate task, then having the same index number should not matter, is this correct?

  • Hi !

    I wasn't able to reproduce your problem when I tried to setup a basic GPIO trigger

    I would try using either using only one task for both of your event handlers (timer and GPIO), or you could trying moving your GPIO task higher in the Execution Order.

    I'm linking here my project so that maybe you can see what is different with yours. 

    GPIO_input.zip

    Kind regards,
    Maxence

  • Thank you for a quick response Maxence,


    Indeed the task execution order was important and we are able to trigger this interrupt now.


    Thanks again!