⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
24 posts / 0 new
Last post
goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
配置中断

Hello Team,

我正在尝试使用DA1586集成陀螺仪,并为传感器配置中断。对于基本I2C通信,我使用P0_2和P0_3引脚作为引用,作为参考,获得所需的输出.Now用于配置中断,我可以有任何参考举例,什么是要连接的硬件引脚是什么?

谢谢,
Goutham.n.

设备:
PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
嗨goutham,

嗨goutham,

Please have a look into the DA14585 IoT Multi Sensor Development Kit. You could find it into the reference design tab of DA14585 from our support page or for your convenience follow the link below=:

https://support.dialog-semiconductor.com/connectivity/product/da14585?qt-product_restricted_=5&qt-view__reference_designs__block_1=5#qt-view__reference_designs__block_1

谢谢,PM_DIALOG.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
Hello Team,

Hello Team,

Actually the sensor is having interrupt pins which have to be connnected to DA14586 microcontroller . So which pins of the microcontroller should I use to connect the interrupt pins of the sensor and configure them in the program?

谢谢,
Goutham。

PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
嗨goutham,

嗨goutham,

要将GPIO配置为中断,您应该使用GPIO_ENABLEIRQ()API。你能澄清你的问题吗?您不应该选择任何特定的GPIO。我觉得那个西南的例子:一个I2C acceleromet阅读er and sending notification dataexample from our support portal might help you. Please follow the steps described into theSW Example: DA1458x Example Setup为了运行该示例。

谢谢,PM_DIALOG.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
实际上我正在互相界面

实际上我在使用DA1586的情况下,在传感器和微控制器之间的I2C通信中,我使用了P0_2和P0_3引脚的I2C通信。我从传感器中获取物理信息,以配置中断有不同的中断引脚加速度计和陀螺仪连接到微控制器。所以我的问题是我应该连接到哪些引脚,并配置它们以启用中断??

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
And which pins in the

And which pins in the development kit are used for configuring interrupt?

PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
嗨goutham,

嗨goutham,

GPIOS是完全可编程的,因此您可以选择其中的任何一个并将其配置为中断引脚。请查看表1:DA14586数据表的引脚说明。你能澄清你想要完成的事情吗?此外,我建议您查看10.3.6功能参考:中断处理功能部分UM-B-079 DA14585&DA14586软件平台参考(SDK 6.0.8)用户手册,以查找API的所有可用。

谢谢,PM_DIALOG.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
Hello Team,

Hello Team,

实际上我在陀螺仪传感器和DA14586 MCU之间执行I2C接口。在将I2C_EEPROM代码编程为引用后,我正在接收终端中的传感器值。对于I2C,我已经使用DA14586的引脚P0_2和P0_3分别连接到传感器SCL和SDA引脚。我使用的传感器是一个基于中断的传感器。要配置中断我必须将传感器的中断引脚连接到对话框MCU。所以我要连接哪个PIN?以及如何配置中断?。我应该使用gpio_enableirq api,就是这样?
有没有参考?
Thanks for the support.

谢谢,
Goutham.n.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
附加查询

附加查询

The main application is when the sensor crosses a set threshold it should generate an interrupt.For this type of application what is the API I should follow?

PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
Goutham,

嗨goutham,

您能够将传感器的中断引脚连接到DA14586的每个GPIO。您应该将GPIO配置为输入并使用GPIO_ENABLEIRQ()以便从DA14586的侧面获取中断。之后,您可以通过使用GPIO_REGISTERCALLBACK()API来注册回调函数以来从传感器中断。

谢谢,PM_DIALOG.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
你好团队,

你好团队,

实际上我想激活传感器并将微控制器保持在睡眠模式中,并且当基于设定阈值生成中断时,如果生成中断,微控制器应该变为活动状态,这样我希望保存微控制器功率。如何完成这种任务?

谢谢,
Goutham.

PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
嗨goutham,

嗨goutham,

>>激活传感器并保持微控制器在睡眠模式下

Could you please clarify it? The DA14586 will be in sleep mode and the sensor will generate an interrupt in orde to wake the chip up? Is that correct? Otherwise, please

谢谢,PM_DIALOG.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
Yes exactly Whenever there is

是究竟在传感器中生成的中断事件时,它应该唤醒微控制器。我想读取传感器数据,然后将微控制器保持在睡眠模式,并且当生成中断时,它应该唤醒微控制器而不是通过微控制器持续监控。

谢谢,
Goutham.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
额外查询

额外查询

1)如何在生成中断后实现回调函数。如果我们使用GPIO回调寄存器API?
2)What is the flow to be implemented for generating interrupt when threshold is crossed.?
3) Enable IRQ and Callback interrupt that's it?

PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
嗨goutham,

嗨goutham,

我强烈建议您查看SDK的BLE_APP_SLEEPMODE。如果设备配置为任何睡眠模式,则可以通过唤醒控制器唤醒它。此外,阅读UM-B-080用户手册的7.6支柱5(睡眠模式)是非常有帮助的,以便了解如何唤醒设备。在您的情况下,中断将从传感器生成而不是按钮生成。

谢谢,PM_DIALOG.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
Hello Team,

Hello Team,

我面临问题在启用GPIO的中断引脚时。

将GPIO引脚配置为我完成的中断引脚
1)在user_periph_setup.h - >使用宏定义端口和引脚
2)In user_periph_setup.c -> Configuring GPIO using GPIO ConfigurePin
并将参数传递到GPIO_ENABLEIRQ()中
Is the above procedure correct?

PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03

嗨goutham,

Please check the steps below demonstrating how to use the IRQ and detecting an interrupt from a button connected to pin1_1. Be aware that with the following code snippet, you will not be able to wake up from the sleep. In case you would like this functionality please let me know or check the ble_app_sleepmode example.

  1. user_periph_setup.h.

#define gpio_button_port gpio_port_1.

#define GPIO_BUTTON_PIN GPIO_PIN_1

  1. user_periph_setup.c.

void gpio_reservations(无效)

{

保留_GPIO(Push_Button,GPIO_BUTTON_PORT,GPIO_BUTTON_PIN,PID_GPIO);

}

void set_pad_functions(void) // set gpio port function mode

{

gpio_configurepin(gpio_button_port,gpio_button_pin,input_pullup,pid_gpio,false);

}

  1. 在您的应用程序代码中

gpio_registercallback(gpio0_irqn,your_callback_function);

GPIO_EnableIRQ(GPIO_BUTTON_PORT, GPIO_BUTTON_PIN,GPIO0_IRQn,true,false,0)

如果gpio_enableirq()中的low_input为true,则如果输入低电平,则会生成IRQ。如果输入低,则触发your_callback_function。您还应包括GPIO.H库。

问候,pm_dialog

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
Hi

Hi

Thanks for the GPIO configuration procedure .I want the microcontroller to wake up from sleep when an interrupt from the sensor is triggered.How to accomplish this?

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
Hi

Hi

Thanks for the GPIO configuration procedure .I want the microcontroller to wake up from sleep when an interrupt from the sensor is triggered.How to accomplish this?

PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
嗨goutham,

嗨goutham,

As I had mentioned in a previous post, if you would like to wake up from any type of sleep mode, you should use the wake-up controller. The code snippet that I have provided you will not be working if your device enters the sleep mode. Could you please indication what you want to accomplish? The same functionality with the ble_app_sleepmode example of the SDK? Did you check this example? You could find the appropriate steps to use the wake-up controller.

谢谢,PM_DIALOG.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
Hi

Hi

实际上,我正在接通基于陀螺中断的传感器,其中我已经完成了I2C接口,并获得了传感器值输出。无论它交叉,它应该通知它应该明确。要清除我想要实现我在我所提到的那个附图。

谢谢,
Goutham.n.

PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
嗨goutham,

嗨goutham,

Apologies but I am little bit confused. In which attached picture are referring to? Could you please attach it?

谢谢,PM_DIALOG.

goutham
Offline
Last seen:10个月前1年
加入:2017-08-10 12:34
对于未附加的道歉

对于未附加的道歉。它是image.please提取zip文件。

谢谢,
Goutham.n.

Attachment:
PM_DIALOG.
Offline
Last seen:3 days 10 hours ago
Staff
加入:2018-02-08 11:03
嗨goutham,

嗨goutham,

请从DA14585的IOT MultiSensor套件参考设计检查IOT项目。您将在DA14585的支持门户网站中找到此参考设计,以及我正在谈论的项目是位于DA14585_IOT_MULTI_SENSOR_DK_V6.160.2 \ PROJECTS \ TARGET_APPS \ IOT \ IOT_585 \ keil_5路径下的项目。也参见第5.3.3段宣传
DA14585 IoT Multi Sensor Development Kit : UM_B_096user manual. The device will start advertising by default. The advertisement time period is determined by the value set on ADV_TIME_OUT. When the timer expires, user_app_on_adv_undirect_complete() is executed to terminate advertising. If sleep mode is set to ARCH_EXT_SLEEP_ON, the system will attempt to power off and enable wake on motion interrupt. If the ALWAYS_ADVERTISE is undefined, the motion sensor is excluded from this project and therefore there are no means to wake the processor. The accelerometer for this purpose is configured for low power operation with the “anymotion” interrupt function set. The processor is allowed to go to Extended Sleep mode and wakes up only when it receives an interrupt from the accelerometer. Then the interrupt handler wkup_intr_non_connected_cb() is executed, which initiates advertising. Please follow the wom_acc_setup() which is called inside user_app_on_adv_undirect_complete() function in order to understand how to wake up via a motion interrupt

谢谢,PM_DIALOG.