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

Timeslot API timeslot IRQs are received 75 us late

I am using the timeslot API, and I have noticed that if I read Timer0 as the first thing in my timeslot, it will be at 75 us. This delay is very consistent, so my timing between timeslots are accurate, but I find it strange that I dont get to execute code in my timeslot until timer0 is already at 75 us.

As I understand the documentation, timer0 keeps track of how long it was since my timeslot started (and thus how much time I have left before it ends). I have not found any reference to a delay from the time slot starts and to I get to execute code, so 75us (around 5000 clock cycles) seems excessive.

I am requesting time slots with the HF clock ready and high priority. The delay does not seem to be affected by if I am having active BLE connections, scanning or neither.

Is it expected behaviour to find the timer0 at around 75 us when you get to execute code in the timeslot? Or am i doing something wrong or havent configured things right?

Setup:

BOARD: nRF52840-DK devkit (NRF52840)

softdevice S140 version 6.1

SDK 15.2

Parents
  • Hi,

    I was not able to reproduce this. Are you reading back the timer0 cc0 value when you get the NRF_RADIO_CALLBACK_SIGNAL_TYPE_START ?

    static volatile uint32_t cc_start_value;
    
    nrf_radio_signal_callback_return_param_t * radio_callback(uint8_t signal_type)
    {
        switch(signal_type)
        {
            case NRF_RADIO_CALLBACK_SIGNAL_TYPE_START:
    
                NRF_TIMER0->TASKS_CAPTURE[0];
                cc_start_value = NRF_TIMER0->CC[0];
                NRF_LOG_INFO("NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: TIMER0_CC0: %d",cc_start_value);

Reply
  • Hi,

    I was not able to reproduce this. Are you reading back the timer0 cc0 value when you get the NRF_RADIO_CALLBACK_SIGNAL_TYPE_START ?

    static volatile uint32_t cc_start_value;
    
    nrf_radio_signal_callback_return_param_t * radio_callback(uint8_t signal_type)
    {
        switch(signal_type)
        {
            case NRF_RADIO_CALLBACK_SIGNAL_TYPE_START:
    
                NRF_TIMER0->TASKS_CAPTURE[0];
                cc_start_value = NRF_TIMER0->CC[0];
                NRF_LOG_INFO("NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: TIMER0_CC0: %d",cc_start_value);

Children
Related