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:传感器控制器 GPIO 触发器无法正常工作

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1523929/cc2652r7-sensor-controller-gpio-trigger-not-working

器件型号:CC2652R7

工具/软件:

对于我们的应用、我们依靠使用传入的数字信号来指示点击量。
传感器控制器被设置为在检测到此信号的上升沿时运行任何代码、但此事件处理程序代码从未执行、您是否认为这可能是什么?
我们已经通过任务测试和在 MCU 固件构建中运行来尝试实现这一点。
详细信息:
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);

执行代码:

// 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 代码:

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

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

    更新:

    当我们删除使用2个事件的另一个任务时、我们的任务代码正常工作。 另一个任务仅使用 timer2事件触发器、而不使用 GPIO。

    我的理解是、因为它是在一个单独的任务中、那么具有相同的索引号应该无关紧要、这是正确的吗?

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

    您好!

    在尝试设置基本的 GPIO 触发器时、我重现了您的问题

    我也会尝试使用 仅使用两个事件处理程序的一个任务 (计时器和 GPIO)、也可以尝试一下 将 GPIO 任务在执行顺序中移至更高的位置。

    我在这里链接我的项目,这样也许你可以看到与你的不同。  

    e2e.ti.com/.../GPIO_5F00_input.zip

    此致、
    Maxence

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

    感谢您的快速响应、Maxence、


    确实是 任务执行顺序很重要 我们现在能够触发这个中断。


    再次感谢!