亲爱的对话框
我有一个da 14580的问题。我拿了一个领导的IC。我读了您的网站,我发现我需要为工作定义两个命令。首先,确定引脚的输出和第二高或低的引脚。
1- GPIO_ConfigurePin( GPIO_PORT_1, GPIO_PIN_0, OUTPUT, PID_GPIO, false);
2- gpio_setactive(gpio_port_1,gpio_pin_0);
我在user_periph_setup.c中将这两个命令放在void set_pad_functions(void)中。但是,输出不高,并且始终低(0 V)。我不知道为什么它不能工作。
如果你能帮助我,我会很高兴。
Regards,
Reza。
设备:

嗨reza.abbasi67,
#define gpio_led_port gpio_port_1.
#define gpio_led_pin gpio_pin_0.
但是让我问你一件事。您在哪个SDK项目工作?你使用的是睡眠模式吗?
谢谢,PM_DIALOG.
亲爱的pm_dialog,
非常感谢您的回复。
I tried to resolve the problem based on your comments and yet the obtained result is not appropriate (The output is 0 V). I do not understand where is the location of GPIO_SetActive. I putted GPIO_SetActive in the user_periph_setup.c in the void periph_init(void). I investigated the order of the commands which you said to me. First, the definition of the output, second reservation and third setting high or low. I use Smart Snippets tool with SDK 5.0.4 and I changed the sleep commands as follows:
在二手配置中。
const static sleep_state_t app_default_sleep_mode = arch_sleep_off;
在da1458x_config_basic.h中:
#undef cfg_mem_map_ext_sleep.
#undef cfg_mem_map_deep_sleep.
在user_periph_setup.h.
#define CFG_UART_SW_FLOW_CTRL
#undef CFG_UART_HW_FLOW_CTRL
感谢您的关注。
Reza。
嗨reza.abbasi67,
It would be very helpful to indicate in which project are you working. In a ble example from our SKD or in any of our reference designs, like DSPS? Also, do you have any f our development board or you have designed you custom board based on DA14580 device? Which are your requirements regarding the LED? Just to turn it on?
谢谢,PM_DIALOG.
嗨PM_DIALOG.
Thank you so much for the replying the message.
我准备模块标题yh - 007 _v1.0 (added to attachment). The module had not been programmed. Although I had a problem in communication with it, I resolved it. Indeed, my main purpose is the development of a LED circuit that works with Bluetooth. For example, If I send 1 to the Bluetooth device with DSPS APP, the LED go toward ON and If I send 2 to the Bluetooth device, the LED become oFF. I have used your information and could communicate with the Bluetooth using DSPS and the mentioned module only for sending and receiving data from PC to phone cell and vice versa. Next phase is ON and oFF for LED and the final phase is the comparison of the obtained data (with IF for 1= ON and 2=OFF).
I would be pleased if you could help me for the project.
最好的祝愿
Reza。
嗨reza.abbasi67,
你有没有检查过无附庸的项目?如果没有,我会强烈建议您看看此参考设计。请按以下链接:
https://www.dialog-seminile.com/produ雷电竞官网登录cts/smartbondtm-codeless-commands.
通过无附庸项目,您可以在DA14580中无线地发送命令。Dodeless AT命令平台允许通过BLE控制本地UART连接的设备以及远程设备。全面的AT-Comments可以控制设备的BLE连接,传感器读出和电池检查。控制在发出AT命令上可以在PC上或集成在第三方微控制器中。例如,您可以在不实现任何代码片段的情况下从手机切换GPIO。如果您有任何使用DSP项目的特定原因,您将不得不修改它更多。请下载无附件和阅读教程的源代码。
谢谢,PM_DIALOG.
亲爱的pm_dialog,
谢谢你的回答。我读了页面。但是,我不是您使用什么应用程序用于发送++ 10.0的应用程序。我没有在您放置的页面中找到任何应用程序。
I am so grateful if you give the site for download the software.
Regards,
雷扎
嗨reza.abbasi58,
你能澄清你吗?您询问您应该使用哪个移动应用程序?如果是,则可以使用任何BLE通用移动应用程序。雷竞技安卓下载
谢谢,PM_DIALOG.
嗨pm_dialog,
非常感谢你帮助我。虽然无附庸项目非常好,但我决定切换到DSP。
根据您的指导,我可以打开LED。我真的很感激。现在,我想发送1号的开启和数字2,用于关闭LED。
我读取了UART_SPS.C,我可以使用我的代码打开LED(我将其添加如下,它在UART_SPS.C中的静态void UART_SPS_THR_EMPTY_ISR(void)中写道。但是,我发现,当TX缓冲区填充时,代码工作且它并不重要,这不是什么类型的数字到缓冲区。LED等待将每个数字或字符发送到DA14580。当收到的字符或数字时,LED始终打开,我无法关闭它。你可以帮帮我吗?
if(uart_txfifo_full_getf()== 1)
{
gpio_setactive(gpio_led_port,gpio_led_pin);
}
if(uart_txfifo_full_getf()== 2)
{
gpio_setinactive(gpio_led_port,gpio_led_pin);
}
看待,
雷扎
嗨reza.abbasi67,
I assume that you would like to send the ‘1’ or ‘2’ from the central device and you would like to DSPS on the peripheral side to parse it and switch on/off the LED. So when the device gets data from the central side the message SPS_SERVER_DATA_RX_IND will occur the message is attached to the user_sps_server_data_rx_ind_handler() so you will be able to get whatever the central sends in the callback mentioned above. The default functionality will just invoke the user_ble_push() in order to push the data in the buffer. So an idea would be to check the incoming data and either do your thing or push the data into the buffer in order to be printed out on the uart side. Now in case that you would like to send back something to the central in case of a specific command what you can do is use the user_send_ble_data() function and directly send a notification to the central without going through the buffers.
谢谢,PM_DIALOG.