⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
BenjaminDu
Offline
Last seen:1 month 3 weeks ago
Joined:2016-03-14 02:38
Data transfer speed

Hi,
如果我在先前数据完成发射之前将更多数据放入缓冲区,则需要从外设tocentral传输数据,系统将崩溃。
so I need to know if the previous data is transmitted.
is there a function for me to do so?
或者可能会检测到错误以停止传输更多数据?

Every time I put 5 bytes into buffer, is there any other way for me to transfer more data? such as to put 10 byte into buffer one time?

Thanks a lot

Benjamin

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
嗨Benjamindu,

嗨Benjamindu,

Since you are transmitting data from peripheral to central i suppose that you are using notifications (since are faster than indications since there is no need to wait for confirmation from the master in order to send the next bulk of data). So, in order to get a confirmation that the previous data has been transmitted you will have to catch the confirmation of the send event, for example, in order to send a notification you should issue a GATTC_SEND_EVT_CMD and that message should have as a response a GATTC_CMP_EVT (the implementation of the custom profile uses the same scheme with custom messages CUSTS1_VAL_NTF_REQ for sending the notification and CUSTS1_VAL_NTF_CFM for confirmation, implemeting the above scheme). Regarding the 5 bytes into the buffer and that the device crash, with the notifications you are able to carry 20 bytes on the same packet and then you can extend that by increasing the MTU size (maximum 512 byets). From what you are mentioning something else is the reason that your device is crashing, if you could track where the code ends up when the device crashes it would help, since it seems quite weird to transfer 5 bytes and crash.

Thanks MT_dialog

BenjaminDu
Offline
Last seen:1 month 3 weeks ago
Joined:2016-03-14 02:38
Hi MT_dialog,

Hi MT_dialog,

Thanks a lot for your answering me so quickly.
Yes I use notifications, do you mean I can get GATTC_CMP_EVT message when a transmit is over? I can find several GATTC_CMP_EVT , but I don't know which is the one I should use.
Attached is a snapshot when "crash" happend, can you help me to have an analysis ? my analysis(guess) is that 20 register are full when I want to put more data into the registers( but I don't know why it's "Can not read" instead of "write". and I wonder if I can check whether they are empty to see I can transmit more data.

Thank a lot

Attachment:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
嗨Benjamindu,

嗨Benjamindu,

Well yes, as mentioned above for each notification message you send a GATTC_CMP_EVT should be indicated back to your application. Regarding the crashing, as far as i can tell from the screenshot you ve send apparently your device is getting detached from the jlink and thats why you get those messages in keil and not because the buffers overflowed or something like that (at least this is what the error in keil indicates). Additionally i see that you are using a quite old reference design (the throughput_eval_peripheral project). I strongly suggest to move onto the latest SDK since the reference design you are using is quite obsolete and not supported. If you are interested to check the throughput capabilities of the 580 you should check the DSPS reference design.

Thanks MT_dialog

BenjaminDu
Offline
Last seen:1 month 3 weeks ago
Joined:2016-03-14 02:38
我下载了最新的SDK

我下载了最新的SDKand now am testing the examples to get familiar with it.
The reason I used the old version SDK is that there are a good example available that can meet my needs, my application has two 580s to exchange data frequently, I need the two 580s to get connected and sometimes they can sleep. I wonder if there are better examples you could recommend to meet my needs.

MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
嗨Benjamindu,

嗨Benjamindu,

如果您想测试吞吐量,您可以使用DSP参考设计,该项目实施外围设备的一侧以及中央的一侧,因此如果它适合您,可以检查。

Thanks MT_dialog

BenjaminDu
Offline
Last seen:1 month 3 weeks ago
Joined:2016-03-14 02:38
Hi MT_dialog,

Hi MT_dialog,

I installed DSPS onto my iPad, but no where to find the target example to run on my 580.

当我有两个580来交换数据时,一个作为中央,另一个作为外设,我发现所有示例都是针对外围设备的,是中心的例子?或者我需要一些配置?

Thanks
Benjamin

MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
嗨Benjamindu,

嗨Benjamindu,

The DSPS folder includes the sps_device folder and the sps_host project, the first one includes the peripheral side and the latter the central side of the application. You can use as a central either the project sps_host thats included in the folder and use another 580 for the demo, or you can use the android/ios application as a central.

Thanks MT_dialog