需求方透传数据发送后停止工作from UART

Learn MoreFAQsTutorials

4 posts / 0 new
Last post
azol.yang
Offline
Last seen:1 month 3 weeks ago
Joined:2020-04-26 14:07
需求方透传数据发送后停止工作from UART

Hi there,

I working a project base on DSPS project of 14580, and I modify the following changes for the default DSPS project:

1. #undef CFG_MEM_MAP_EXT_SLEEP

2. change app_default_sleep_mode value to ARCH_SLEEP_OFF

3. change GPIO_UART1_RX_PIN to GPIO_PIN_2

4. use CFG_UART_SW_FLOW_CTRL instead of CFG_UART_HW_FLOW_CTRL

At the app side, I send data and receive data on **5cb8 and **5cba characteristics, and I observe the **5cb9 characteristics to get a notification of the flow state, but it just notify me once, and the value is 1, it means I can send data from app to device, is that right?

The issue I met is: the passthrough between BLE and UART is working fine, but after run for a while, the UART side has sent much data to BLE, the passthrough seems is stop, but I did not see any exception throw, and the BLE signal still can be discovered on my app, so I think the firmware did not hang, just the passthrough not work after there much data sent to BLE from UART

Thanks

Device:
PM_Dialog
Offline
Last seen:16 hours 59 min ago
Staff
Joined:2018-02-08 11:03
Hi azol.yang,

Hi azol.yang,

My apologies but I am little bit confused with your description. Can you please try to explain your qurstion?

>>the passthrough seems is stop, but I did not see any exception throw

Do you mean that the device is disconnected from the Mobile application, but it is advertising? What is the mobile application that you are using? Is it our DSPS mobile application our you are using any other BLE generic application?

>>> so I think the firmware did not hang, just the passthrough not work after there much data sent to BLE from UART

Can you please run I tin debug mode?

In your initial post, I am seeing that you are using SW flow control. Can you please try it with HW Flow control (RTS/CTS)?

Thanks, PM_Dialog

azol.yang
Offline
Last seen:1 month 3 weeks ago
Joined:2020-04-26 14:07
hi PM_Dialog,

hi PM_Dialog,

Thanks for you reply!

>> Do you mean that the device is disconnected from the Mobile application, but it is advertising? What is the mobile application that you are using? Is it our DSPS mobile application our you are using any other BLE generic application?

no, the BLE works fine, I can connect\disconnect it with LightBlue after this issue happened. But there is no data receive from UART, I mean the BLE side just waiting, no incoming data.

>> Can you please run I tin debug mode?

could you tell me how to run "I tin " debug mode?

>>In your initial post, I am seeing that you are using SW flow control. Can you please try it with HW Flow control

I can't use HW Flow Control, because the UART side only has TX and RX, in addition, is there anything that needs to do on the mobile app side? My iOS app has set to enabled notification for the FLOW characteristic, and send data to UART side when the value of FLOW char is 1

I'm trying to enable UART2 for debug this issue:

1. CFG_PRINTF in the "da1458x_config_basic.h"

2. connect P1_2(TX), P1_3)(RX) to the USB-TTL adapter, and the adapter was connected to my MAC

3. rebuild the DSPS project, flash it into the devkit(basic) by SPI

4. using LightBlue on my iPhone to connect the BLE

Result:

the serial tool has open the serial port of USB-TTL, but nothing display when LightBlue connected to the DA14580, I expected it will show a string: "Device connected", because there is a `arch_printf("Device connected\r\n");` in the user_on_connection(...), please help, is there something I missed?

Thanks!

PM_Dialog
Offline
Last seen:16 hours 59 min ago
Staff
Joined:2018-02-08 11:03
Hi azol.yang,

Hi azol.yang,

It as I typo – I meant to run it in debug mode, but since it is running correctly no need to run it in debug mode.

>>>I can't use HW Flow Control, because the UART side only has TX and RX.

Are you sending data rom your PC by using a serial terminal? If yes, can you please share the configuration? Additionally what is the jumper configuration you are using in the Basic DK - can you please share a photo?

Thanks, PM_Dialog