Hi all,
I'm developing a BLE HIDS mouse, based on "Bluetooth: Peripheral HIDS mouse" example from Nordic. I need a high sample rate sending mouse position to PC (Around 100 samples/s), but I'm obtaining a much much lower rate (Around 10~20 samples/s).
Also, I suspect that not all the times I call bt_hids_inp_rep_send()
, the PC receive the new data. Is this possible? The function returns no error.
I'm not using k_work_submit
(I had some queue overflow problems). I'm calling bt_hids_inp_rep_send()
directly in an infinite loop.
for (;;) {
gpio_blue_led(1);
ble_mouse_move( 2, 0 );
gpio_blue_led(0);
k_sleep(K_MSEC(2));
}
ble_mouse_move()
function basically write buffer to be sent and call bt_hids_inp_rep_send()
. I put a GPIO on and off to see with a logic analyzer time inside ble_mouse_move()
and the result is very very variable, from ~0.23ms to ~140ms, and with no pattern. How can it be explained? What sample rate can I expect with a nRF52832?