yabo国际娱乐Dialog Semiconductor客户支持-串行uart ble da14681外设 https://support.dialog-semiconductor.com/resource-keywords/serial-uart-ble-da14681-peripheral 当串行电缆断开时,Ad_uart_read()失败 https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/aduartread-fails-when-serial-cable < div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >我跑到一个情况,试图从UART读取停止我的应用程序。我为UART通信配置了两个引脚,并在这些引脚上附加了一个USB到TTL适配器。在这些条件下,一切工作正常,但如果我在没有连接USB to TTL适配器的情况下启动主板,应用程序在调用ad_uart_read()时似乎会停止。我还发现,当我简单地连接RX和TX引脚时,它不会停止。

对于我的应用程序,通过UART通信是一个可选特性,我需要应用程序运行,无论RX/TX是否连接。< / p > < p >我有事情如何配置如下:< / p > < p > / /配置两个别针UART: < br / >静态常量gpio_config gpio_cfg [] = {< br / > HW_GPIO_PINCONFIG (HW_GPIO_PORT_1、HW_GPIO_PIN_2、输出、UART_TX假),< br / > HW_GPIO_PINCONFIG (HW_GPIO_PORT_1、HW_GPIO_PIN_4、输出、选择UART_RX假),< br / > HW_GPIO_PINCONFIG_END < br / >} < br / >…< br / >静态孔隙periph_init (void) {< br / > hw_gpio_configure (gpio_cfg); < br / >} < / p > < p > / /在一个单独的任务设置一个循环读取UART: < br / > uart_device UART = ad_uart_open (SERIAL1); < br / > (;;) {< br / > uint8_t buf [BUF_LEN]; < br / > int len = ad_uart_read (BUF_LEN UART,但,OS_EVENT_FOREVER); < 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 / serial-uart-ble-da14681-peripheral typeof =“skos:概念”属性= " rdfs: label skos: prefLabel”数据类型= " " >串行uart ble da14681外围< / > < / 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 / da1468x” typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">DA1468x 2018年5月30日星期三15:58:31 +0000 ainwood87 189508年https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/aduartread-fails-when-serial-cable#comments