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
  • just like nrf51_sdk_v4_4_2_33551 ?

    init like this

    static void radio_notification_init(void)
    {
        uint32_t err_code;
    
        err_code = ble_radio_notification_init(NRF_APP_PRIORITY_HIGH,
                                               NRF_RADIO_NOTIFICATION_DISTANCE_4560US,
                                               ble_flash_on_radio_active_evt);
    
      	APP_ERROR_CHECK(err_code);
    }
    

    and send data in ble_flash_on_radio_active_evt() ?

    Does ble_flash_on_radio_active_evt() will be executed before the connection interval occurs

    what does

    void ble_flash_on_radio_active_evt(bool radio_active)
    {
        m_radio_active = radio_active;
    }
    

    do?

Reply
  • just like nrf51_sdk_v4_4_2_33551 ?

    init like this

    static void radio_notification_init(void)
    {
        uint32_t err_code;
    
        err_code = ble_radio_notification_init(NRF_APP_PRIORITY_HIGH,
                                               NRF_RADIO_NOTIFICATION_DISTANCE_4560US,
                                               ble_flash_on_radio_active_evt);
    
      	APP_ERROR_CHECK(err_code);
    }
    

    and send data in ble_flash_on_radio_active_evt() ?

    Does ble_flash_on_radio_active_evt() will be executed before the connection interval occurs

    what does

    void ble_flash_on_radio_active_evt(bool radio_active)
    {
        m_radio_active = radio_active;
    }
    

    do?

Children
Related