- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We want to measure the processing time by the counter.
A timer of 1 mS is set by wiced_init_timer(,,,WICED_MILLI_SECONDS_PERIODIC_TIMER).
The callback process for that timer updates the upcount.
However, it seems that the timer callback is not called during the GATTC_OPTYPE_NOTIFICATION event.
Is this recognition correct?
Can I set callback and interrupt priorities somewhere?
We use CYBT-213043-MESH.
Best Regards,
Kanda
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Kanda San,
Sorry for late response.
I tested the project. Its working as expected.
Please note , multiple notifications may send in one millisecond depending upon the throughput of your device.
In your case, the device is able to receive multiple packets in the same instant. That's why you are able to see same time stamp for multiple notification received event. For example you can refer to attached CySmart logs and time stamps of notification received.
Also please note, timers may not be 100% accurate.
Note:
In case if you are trying to evaluate device throughput using timer, it may not be correct way. You can take help of CyBluetool (if needed) to find BLE throughput.
Refer here:
CyBluetool (Windows Installer)
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Kanda San,
The timer should get triggered regardless of any BT event getting triggered, unless you are not stopping the timer in between.
Can you please double check ?
Please let us know how you tested and confirmed the issue. You may also share the project and steps.
Thanks & Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Anjana-san,
Thank you for your reply.
I attached the project.
It is based on the CYPRESS sample. (BLE_HelloClient / BLE_HelloSensor)
We acquire the counter value by timer interrupt in the process (hello_client_process_data_from_slave) called by the event (GATTC_OPTYPE_NOTIFICATION).
The timer should be updated because it is processed each time data is received, but the count value does not change.
Timer initialization:
if (wiced_init_timer (& hello_client_ms_timer, hello_client_fine_timeout, 0, WICED_MILLI_SECONDS_PERIODIC_TIMER) == WICED_SUCCESS)
{
wiced_start_timer (& hello_client_ms_timer, HELLO_CLIENT_APP_FINE_TIMEOUT_IN_MS);
}
Timer callback:
void hello_client_fine_timeout (uint32_t finecount)
{
g_hello_client.fine_timer_count ++;
// WICED_BT_TRACE ("d");
}
Please let me know what the problem is.
Best Regards,
Kanda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Kanda San,
Sorry for late response.
I tested the project. Its working as expected.
Please note , multiple notifications may send in one millisecond depending upon the throughput of your device.
In your case, the device is able to receive multiple packets in the same instant. That's why you are able to see same time stamp for multiple notification received event. For example you can refer to attached CySmart logs and time stamps of notification received.
Also please note, timers may not be 100% accurate.
Note:
In case if you are trying to evaluate device throughput using timer, it may not be correct way. You can take help of CyBluetool (if needed) to find BLE throughput.
Refer here:
CyBluetool (Windows Installer)
Thanks,
Anjana