4 posts / 0 new
Last post
asmaitha
Offline
Last seen:5 years 1 week ago
Expert
加入:2014-11-20 08:45
DSPS gets disconnected

Hello,

I have a customized board using DA14580-01,
I am using DSPS profile, whenever the user send data to DA14580 using DSPS, I need to certain set of actions like writing to one of my slave on SPI interface(all this process takes around 100sec), but what I observed is that in the mean time my BLE device is getting disconnected.

Kindly let me know the possible reasons??

Will keeping my BLE always solve ON my problem?

Thanks
asmaitha

MHv_Dialog
Offline
Last seen:6 days 16 hours ago
工作人员
加入:2013-12-06 15:10
Hi,

Hi,

The DA14580 is a single core SoC which means that your application needs to free resources in order to allow the Bluetooth connection to be serviced. Typically a Smart device, will disconnect if the peripheral device has not responded for 2 seconds (it's called the supervisory timeout).

You will have to break your time consuming tasks into smaller chunks and suspend/resume these smaller tasks with a timer. It is also recommended that you synchronize your time consuming activity with the radio so that you start your task right when the radio has completed it's task.

This problem will not go away by changing the sleep mode implementation.

asmaitha
Offline
Last seen:5 years 1 week ago
Expert
加入:2014-11-20 08:45
Hello MHv_dialog,

Hello MHv_dialog,
I couldn't completely understand your explanation.
Can you kindly let me know if there are any examples implemented or some information, so that I can further clearly understand this.

我的情况也是that once app_ble_push functions gets invoked when user sends some data to DA14580,
I have a task that takes around 100sec and unless this task completes I can't allow the user to send any data via DSPS application to DA14580, because from the data what user sends I will be writing corresponding values to my slave registers(i.e. my task which takes 100secs of time).

So kindly help me out.

Thanks
asmaitha

MHv_Dialog
Offline
Last seen:6 days 16 hours ago
工作人员
加入:2013-12-06 15:10
Hi

Hi

It is not possible to simultaneously service a task that takes 100 seconds and maintain a Bluetooth connection. You will have to find a way to split your task into smaller, less time consuming tasks, thus allowing the microcontroller time and resources to service the Bluetooth Connection. You must implementsome flow control mechanism available in the DSPS sample application that could be used to prevent new data from being transmitted while you are busy writing to your slave registers. Here is the outline of what you should do:

When you receive data from the user, send a packet back to the user to hold off on transmissions. Then write a few of your registers and set a timer. When the timer times out write another few registers etc. until you have written all registers. At this point you can send a packet to the user to allow a new transmission.