用senser controller studio 调试GPIO中断,引脚高低电平可以读取,但是配置为引脚中断无效
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.
首先需要知道您是如何配置引脚中断的,您先查阅getting_started_guide,里面有关于配置中断的要点,确保您正确配置了引脚中断。
在senser controller studio安装路径下,您可以找到:C:\Program Files (x86)\Texas Instruments\Sensor Controller Studio\docs\getting_started_guide_sensor_controller_studio
引脚配置的是Digital input pins,还有就是读引脚状态电瓶没有问题, 然后根据Help Viewer Senser Control Studio 2.4.0.793进行的中断配置,您提供的这个文档我没有找到关于中断配置的介绍,麻烦告知是第几章第几节谢谢,
Sensor Interrupt (Initialization Code)
... Enable the sensor ...
// Set up the first interrupt trigger
evhSetupGpioTrigger(0, AUXIO_I_SENSOR_IRQ, 0, EVH_GPIO_TRIG_ON_EDGE);
Sensor Interrupt (Event Handler Code)
... Read and process sensor data ...
// Set up the next interrupt trigger
evhSetupGpioTrigger(0, AUXIO_I_SENSOR_IRQ, 0, EVH_GPIO_TRIG_ON_EDGE);
Sensor Interrupt (Termination Code)
// The currently enabled event trigger must be cancelled manually
evhCancelTrigger(0);
Button Debouncing (Event Handler Code)
// If a button edge has been detected (not yet debounced) ...
if (state.isDebouncing == 0) {
// Store the state (do not read the pin, as it may have changed since the trigger)
output.buttonState ^= 1;
// Alert the System CPU application when the button is pressed
if (output.buttonState == BUTTON_PRESSED) {
... Do something here ...
}
// Start 200 ms debouncing interval
evhSetupTimer1Trigger(0, 200, 2);
// Update state
state.isDebouncing = 1;
// When debouncing has been completed ...
} else {
// Start listening for the opposite button state
if (output.buttonState == BUTTON_PRESSED) {
evhSetupGpioTrigger(0, AUXIO_I_BUTTON, BUTTON_RELEASED, EVH_GPIO_TRIG_ON_MATCH);
} else {
evhSetupGpioTrigger(0, AUXIO_I_BUTTON, BUTTON_PRESSED, EVH_GPIO_TRIG_ON_MATCH);
}
// Update state
state.isDebouncing = 0;
}这是我看的你们官网资料提供的实例
关于中断配置的介绍
您在2.4.2章节可以看到
您希望将DIO配置为GPIO输入通过EDGE_DET产生中断,正确配置方法可以在CC13X2技术参考手册中的13.4.1章节找到,希望对您有所帮助,谢谢。
您能提供一下配置实例么?关于这些介绍我认为和我参考的文档说法基本一致
您希望在小核(RF Core)启用中断,我找到一个跟您问题相关的链接,您可以作为一个参考。
您说的实例是哪些呢?一行实例代码也没有提供。我口中的实例是代码行
Sensor Interrupt (Initialization Code)
... Enable the sensor ...
// Set up the first interrupt trigger
evhSetupGpioTrigger(0, AUXIO_I_SENSOR_IRQ, 0, EVH_GPIO_TRIG_ON_EDGE);
Sensor Interrupt (Event Handler Code)
... Read and process sensor data ...
// Set up the next interrupt trigger
evhSetupGpioTrigger(0, AUXIO_I_SENSOR_IRQ, 0, EVH_GPIO_TRIG_ON_EDGE);
Sensor Interrupt (Termination Code)
// The currently enabled event trigger must be cancelled manually
evhCancelTrigger(0);
Button Debouncing (Event Handler Code)
// If a button edge has been detected (not yet debounced) ...
if (state.isDebouncing == 0) {
// Store the state (do not read the pin, as it may have changed since the trigger)
output.buttonState ^= 1;
// Alert the System CPU application when the button is pressed
if (output.buttonState == BUTTON_PRESSED) {
... Do something here ...
}
// Start 200 ms debouncing interval
evhSetupTimer1Trigger(0, 200, 2);
// Update state
state.isDebouncing = 1;
// When debouncing has been completed ...
} else {
// Start listening for the opposite button state
if (output.buttonState == BUTTON_PRESSED) {
evhSetupGpioTrigger(0, AUXIO_I_BUTTON, BUTTON_RELEASED, EVH_GPIO_TRIG_ON_MATCH);
} else {
evhSetupGpioTrigger(0, AUXIO_I_BUTTON, BUTTON_PRESSED, EVH_GPIO_TRIG_ON_MATCH);
}
// Update state
state.isDebouncing = 0;
}这是我看的你们官网资料提供的实例
您目前看到的实例,如上所说,此实例也是将DIO配置为GPIO输入通过EDGE_DET产生中断
您提供的文档全部反复研读很多次,官方提供的文档查到的也都阅读了,实在无法产生中断,一次都没产生,更别说中断是否是一次性的了。
仿真调试时,通常时可以产生中断的,您使用官方实例,不做修改看能否产生中断,以排除您的仿真工具问题。
个人完全按照官方实例未做任何修改,仿真工具个人不认为有什么问题,我采集温度是正常的。
需要您提供下使用的SDK版本和实例,另外您是在senser controller studio调试的对吧?您是如何看出中断无效的?
simplelink_cc13xx_cc26xx_sdk_7_10_01_24我的实例早就已经发出来了,senser controller studio就是这个,所有支持包和工具全是最新版本的,验证中断无效是很简单的事情啊,比如说指示灯中断来了让LED指示灯翻转一下电平,或者中断来了让一个变量加一,方法无穷无尽啊
不用了,senser controller studio仿真调试,无法实现中断仿真,没做任何改动把整个程序用CCS下载到芯片中中断可以正常产生。目前是这种情况
好的,感谢您的反馈,刚刚我在这个旧贴中获得了使用senser controller studio进行中断实验的一些信息,似乎与响应速度相关,希望对您有新的启发,谢谢。
感谢您的反馈。我们将检查原由,因为这是您最新的跟踪显示的内容。