This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How can I send hid data with TIMER1_IRQHandler strict every 8ms?

I find it unstable to send hid data, even if I set timer 1 every 8ms to send hid data.

I can catch data bag from wireshark it seems that interval of two data even close to 1ms.

How can this happen?

but if I set timer every 15ms, it become more stable.

But I need send it every 8ms, can you help?

It is very stable in lenovo N700 mouse (nrf51822)

test soft is in attachments

Best regards

MouseMovementRecorder.zip

Parents
  • Hi,

    You should send mouse-movement each connection interval, not hard code it. I suspect that your link is not getting a optimal connection interval, which makes the mouse seem sloppy.

    Try:

    1. Check your connection interval, you should have < 15 ms.
    2. Send mouse data on the radio notification event (setup to happen x us before connection interval occurs) using the ble_radio_notification library

    Best regards Håkon

Reply
  • Hi,

    You should send mouse-movement each connection interval, not hard code it. I suspect that your link is not getting a optimal connection interval, which makes the mouse seem sloppy.

    Try:

    1. Check your connection interval, you should have < 15 ms.
    2. Send mouse data on the radio notification event (setup to happen x us before connection interval occurs) using the ble_radio_notification library

    Best regards Håkon

Children
No Data
Related