与ADC上的ECG监控模块接口DA14580

9 posts / 0 new
最后一篇
Herochua617.
离线
Last seen:3 years 11 months ago
加入:2017-01-18 12:46
与ADC上的ECG监控模块接口DA14580

你好呀,

我在这几件事中有一些困难:

我想连接https://www.sparkfun.com/亚博电竞菠菜products/12650to the DA14580 development kit. The dev. kit only have 4 ADC channels and since I am using SPI communication, I have my P0_3 and P0_0 used up. By right I only need 1 adc port from the output of the AD8232 module and 2 digital IO from dev. kit. I have seen the keil file in ble_app_peripheral and found that I need to configure from gpio.c. Can the DA14580 dev. kit provide 2 digital IO pins to the AD8232 module? and How to configure pins for both ADC and digital IO?

2. ATT和GATT功能可以让我使用BLE扫描仪接收实时信息,以获得ECG波形和心率读数吗?如果不能,任何推荐应用程序允许我通过Android平台或任何等同的软件显示我的数据,如果不使用Android平台?(用于远程监控目的)

谢谢!

设备:
MT_dialog
离线
Last seen:2个月1周前
职员
加入:2015-06-08 11:34
嗨Herochua617,

嗨Herochua617,

1)我不确定我收到问题,从PORT0引脚0,1,2,3预定义有ADC功能的引脚,只能在ADC连接的那些引脚上。所提到的引脚仅用于启动过程,在设备启动后,您可以根据需要配置和使用这些引脚,引导过程由引导ROM代码控制,您不必担心设置这些引导程序自己抓住spi。您只需设置您想要使用的引脚的配置。您可以通过调用函数gpio_configurepin()和您想要的设置来切换引脚的配置。

2)SDK将允许您使用ATT / GATT / GAP协议连接到BLE Android手机和交换数据,并从传感器接收实时信息,可以检查实现自定义配置文件的App_ble_Peripheral以发送自定义数据从您的设备到手机。是的,BLE扫描仪将是一个解决方案,用于使用ADC测量检查手机上的通知特性。

Thanks MT_dialog

Herochua617.
离线
Last seen:3 years 11 months ago
加入:2017-01-18 12:46
Dear MT_Dialog,

Dear MT_Dialog,

谢谢,你对这两个问题都很好地回答了我,但是,只要确定第1号问题,你是否意味着需要在设备启动之前连接引脚配置(如附加图片中所示)?设备启动后,我允许删除所有这些连接,我可以将代码刻录到DEV中。当我希望没有连接时,套件,如果我错了,请纠正我。

Additional question: Which c files or h files in ble_app_peripheral_580, that I need to start with if I want to configure the GPIO pins? There so many files. I know that the configure pins variable is already set up in gpio.c and gpio.h. Where do I need to code if I want to use the ADC ports and the GPIO ports? Or I need to make a custom profile? For configuring ADC pins for ECG signal, do this something to do with this document (RW-BLE-PRF-HRP-IS) - Heart Rate Profile?

附件:
MT_dialog
离线
Last seen:2个月1周前
职员
加入:2015-06-08 11:34
嗨Herochua617,

嗨Herochua617,

Sorry, i cannot figure out that much from the picture that you 've pasted in the first post, what i ve mentioned on my previous post is that the SPI pins are only used during the booting procedure, i am not able to predict if by having connected your ADC sensor on the booting pins will have any affect in downloading the program into the sysram (i suppose that it will be ok). When the system boots, if there is nothing in the OTP, the pins from port 0 are configured and used in order for the 580 to find an external module to download code (when i mention pin configuration i mean the code that either the bootloader of you fw has in the set_pad_functions() function in order to assign a function and a state to your pins), so the pins that you are going to download code from should be connected with the external memory, after the download of the code is complete then your fw should reconfigure those pins (from the set_pad_functions() function in your fw) in order to be used in any configurations the fw would like. I hope thats clear.

The file and the function that handles the configuration of your pins during start up and during wake up is the periph_init() function in the user_periph_setup.c file. If you would like to just to read the attached ADC, you will have to configure the pin that is connected with your ADC sensor as a PID_ADC pin (check the set_pad_functions() in an example to see how the pins are configured). After you have configured your pin, normally you would set up a ke_timer in order to read the ADC value periodically. In order to send the value to your central you can either start with a custom profile or use the HRPS which is a SIG qualified profile. The document that you mentioned describes the HRPS protocol, it has nothing to do in configuring the ADC, it only describes the HRP SIG profile.

Thanks MT_dialog

Herochua617.
离线
Last seen:3 years 11 months ago
加入:2017-01-18 12:46
你好,

你好,

非常感谢你!我一直在搜索例如set_pad_functions()以查看如何配置引脚。但我找不到任何相关的例子。如果您不介意,您是否有任何示例,我可以从中开始?我已经下载了整个SDK 5.0.3。

MT_dialog
离线
Last seen:2个月1周前
职员
加入:2015-06-08 11:34
嗨Herochua617,

嗨Herochua617,

set_pad_functions()是在所有SDK示例和引用设计中的整个SDK中使用的函数,如果您在包含BLE函数的任何示例中进行搜索,您将能够找到此功能,或者您可以搜索GPIO_CONFIGUREPIN()直接地。

Thanks MT_dialog

Herochua617.
离线
Last seen:3 years 11 months ago
加入:2017-01-18 12:46
嗨mt_dialog,

嗨mt_dialog,

我已经完成了PIN保留和PIN配置,其中在user_periph_setup.h *和user_periph_setup.c *中定义引脚,但我尚未读取ADC的数据。(请参阅附件),但我确实希望通过智能手机通过BLE获得数据。我确实听到了你,我需要用ke_timer做点什么吗?您是否有任何示例,我也可以推荐>?我发现这种链接有关的类型也是如此https://support.dialog-semiconductor.com/faq/how-use-ketimer-during-wake...

除此之外,我想通过使用UART通信通过TERA术语显示我的数据。我应该改变哪一部分编码?

I am sorry to trouble you but I have a little knowledge in using the DA14580 development kit and I have my deadline coming in for my project..
谢谢!

MT_dialog
离线
Last seen:2个月1周前
职员
加入:2015-06-08 11:34
嗨Herochua617,

嗨Herochua617,

您必须设置内核定时器才能触发ADC来测量,您可以看一下Peripheral_examples中的ADC示例,以便了解如何操作ADC,您也可以查看BLE_APP_PERITIVELAL示例要检查如何设置内核定时器(在函数user_custs1_ctrl_wr_ind_handler()函数中,app_easy_timer()将设置内核计时器,并且从该函数中可以声明回调函数以便以特定间隔读取ADC)。关于打印,您可以在da1458x_config_basic.h中定义CFG_Printf定义,并使用ARCH_Console.h文件和ARCH_PRINTF()函数以开始打印ADC的值。请查看UM-B-050和UM-B-051文档,以便更好地掌握SDK5。您将能够在Software Development Kit中的“文档”选项卡中找到这些文档。

Thanks MT_dialog

Herochua617.
离线
Last seen:3 years 11 months ago
加入:2017-01-18 12:46
亲爱的mt_dialog,谢谢!

Dear MT_dialog,

Thanks!