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
  • I try code above ,if I set MIN_CONN_INTERVAL MAX_CONN_INTERVAL the same val I will get error 13 (Operation timed out) when run

    static void bond_manager_error_handler(uint32_t nrf_error)
    {
        APP_ERROR_HANDLER(nrf_error);
    }
    

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /< Minimum connection interval (7.5 ms). */ #define MAX_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /< Maximum connection interval (7.5 ms). */

    So how can I set interval to7.5ms or 8ms and send just one package in a interval ?

Reply
  • I try code above ,if I set MIN_CONN_INTERVAL MAX_CONN_INTERVAL the same val I will get error 13 (Operation timed out) when run

    static void bond_manager_error_handler(uint32_t nrf_error)
    {
        APP_ERROR_HANDLER(nrf_error);
    }
    

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /< Minimum connection interval (7.5 ms). */ #define MAX_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /< Maximum connection interval (7.5 ms). */

    So how can I set interval to7.5ms or 8ms and send just one package in a interval ?

Children
No Data
Related