Problem Statement
-使用GPIO_RegisterCallback()注册一个GPIO中断/ISR,并检测当系统正常运行时是否短按和长按按钮。
我尝试的是
void register_button_isr(void)
{
NVIC_DisableIRQ(GPIO1_IRQn);
// Push Button input
GPIO_EnableIRQ(GPIO_PORT_0, GPIO_PIN_6, GPIO1_IRQn, true, true, 0);
}- SW_2按下时点亮DA14583_ProDK的LED,再次按下时关闭LED。
Observation
下面(ble_examples.zip)是包含修改过的Blinky示例的文件和我在ble_all_in_one应用程序中添加的新文件
期待一个积极的响应。< / p > < p >提前感谢你< / p > < p >对< br / > Dhruv沙< / p > < / div > < / div > < / div > < div class =”字段field-name-field-forum-keywords field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >关键词:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / resource-keywords / gpio typeof =“skos:概念”属性= " rdfs: label skos: prefLabel”数据类型= " " > GPIO < / > < / div > < div class = " field-item古怪”> < a href = " / resource-keywords /深度睡眠”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " >深度睡眠< / > < / div > < div class =”field-item甚至“> < a href = " / resource-keywords /中断”“=“skos:概念”属性=“rdfs: label skos: prefLabel” datatype="">Interrupt
但是当我再次按下时,中断不再反应。
出了什么问题?
我在附件中添加了代码。< / p > < / div > < / div > < / div > < div class =”字段field-name-field-forum-keywords field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >关键词:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / resource-keywords /中断”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " >中断< / > < / div > < div class = " field-item古怪”> < a href = " / resource-keywords /教程”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " >教程< / > < / div > < / div > < / div > < div class =”字段field-name-field-attachment field-type-file field-label-above”> < div class = "字段标签" >附件:< / div > < divclass="field-items">
in void set_pad_functions(void):
GPIO_ConfigurePin(I2C_INT1_PORT, I2C_INT1_PIN, INPUT_PULLUP, PID_GPIO, true);//G Sensor INT1
GPIO_RegisterCallback(GPIO0_IRQn, LIS3DH_Interrupt1_Handler);
GPIO_EnableIRQ(I2C_INT1_PORT, I2C_INT1_PIN, GPIO0_IRQn, false, true, 3);/ / 0 =比;然而,我发现我的回调函数将在每次唤醒时间被调用。
The reason may be that the GPIO_EnableIRQ(in set_pad_functions) is set again and the interrupt pin is high at that time.
As I know, the GPIO interruption of DA14585 is level triggered, right?
Do you guys have any idea to solve this problem?
Thanks.
我想用你文档中描述的异步方式唤醒我们的应用程序。
我们使用扩展睡眠模式。
在休眠之前,我配置了端口,注册了回调函数并启用了irq。
通过J-Link下载和运行应用程序,一切工作正常。
通过SmartSnippets将相同的应用程序编程到我们的EEPROM,它的行为不同。一切都是一样的,但是回调函数从未被调用。广告时段运作良好。
在阅读了所有关于睡眠模式和醒来的文档后,我不明白为什么它不能工作。
欢迎任何帮助。< br / > < br / >问好阿明< / p > < / div > < / div > < / div > < div class =”字段field-name-field-forum-keywords field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >关键词:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / resource-keywords / isr”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > ISR < / > < / div > < div class = " field-item古怪”> < a href = " / resource-keywords /唤醒”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " >唤醒< / > < / div > < div class =”field-item甚至“> < a href = " / resource-keywords / wkupctregistercallback”“=“skos:概念”属性=“rdfs: label skos: prefLabel” datatype="">wkupct_register_callback
在SDK 5.0.2.1的peripheral_examples中提供的示例uart2_async中,方法uart2handler调用uart2_rec_data_available_isr,但我不明白是什么在调用UART2_Handler方法本身。
还有一个UART2_Handler_func方法,它似乎没有在任何地方定义。有人能解释一下这是怎么安排的吗,所以我可以使用它正确吗? < / p > < p > < br / >感谢Ankit < / p > < / div > < / div > < / div > < div class =”字段field-name-field-forum-keywords field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >关键词:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / resource-keywords / uart2 typeof =“skos:概念”属性= " rdfs: label skos: prefLabel”数据类型= " " > uart2 < / > < / div > < div class = " field-item古怪”> < a href = " / resource-keywords / isr”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > isr < / > < / div > < div class =”field-item甚至“> < a href = " / resource-keywords /中断”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " >中断< / > < / div > < div class = " field-item古怪”> < a href = " / resource-keywords /处理程序”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " >处理< / > < / div > < div class =”field-item甚至“> < a href = " / resource-keywords / da14580-uart”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > DA14580UART < / > < / div > < / div > < / div > < div class =”字段field-name-field-device field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >设备:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / forum-post-device / da14580”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > DA14580 < / > < / div > < / div > < / div >