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

Not able create one more repeated timer in ble_app_hrs

Hi

I am created one more timer in ble_app_hrs

like in timer_init()

err_code = app_timer_create(&m_current_timer_id, APP_TIMER_MODE_REPEATED, current_timel_meas_timeout_handler);

then i am not getting advertisement.

But if i comment one timer and my timer . Then it is working fine.

What will be issue kindly tell me.

kindly suggest me.

Regards Balaji

Parents
  • Hi Hakon,

    I am planning to use 8 rtc1 timers.

    actually i tried with timer 0. but it is not going to timeout handler.

    void timer0_init() { NRF_TIMER0->TASKS_STOP=0; NRF_TIMER0->PRESCALER=4; NRF_TIMER0->BITMODE=3; NRF_TIMER0->MODE=0; NRF_TIMER0->TASKS_CLEAR = 1;

    NRF_TIMER0->EVENTS_COMPARE[0]=0;
    NRF_TIMER0->CC[0]= 5000*1000;
    NRF_TIMER0->INTENSET=1<<16;
    
    NVIC_ClearPendingIRQ(TIMER0_IRQn);
        NVIC_SetPriority(TIMER0_IRQn, 0);
        NVIC_EnableIRQ(TIMER0_IRQn);
    

    }

    void TIMER0_IRQHandler(void) { NRF_GPIO->OUTCLR=1<<19; NRF_TIMER0->TASKS_STOP=1; NRF_TIMER0->EVENTS_COMPARE[0]=0; }

    main() { NRF_GPIO->OUTSET=1<<19; timer0_init(); }

    this codes works in normal application. but when i added to ble_app_hrs by replacing NVIC from sd_nvic i am getting advertisement but controller is not going to TIMER0_IRQHandler after 5 seconds.

    Regards Balaji

Reply
  • Hi Hakon,

    I am planning to use 8 rtc1 timers.

    actually i tried with timer 0. but it is not going to timeout handler.

    void timer0_init() { NRF_TIMER0->TASKS_STOP=0; NRF_TIMER0->PRESCALER=4; NRF_TIMER0->BITMODE=3; NRF_TIMER0->MODE=0; NRF_TIMER0->TASKS_CLEAR = 1;

    NRF_TIMER0->EVENTS_COMPARE[0]=0;
    NRF_TIMER0->CC[0]= 5000*1000;
    NRF_TIMER0->INTENSET=1<<16;
    
    NVIC_ClearPendingIRQ(TIMER0_IRQn);
        NVIC_SetPriority(TIMER0_IRQn, 0);
        NVIC_EnableIRQ(TIMER0_IRQn);
    

    }

    void TIMER0_IRQHandler(void) { NRF_GPIO->OUTCLR=1<<19; NRF_TIMER0->TASKS_STOP=1; NRF_TIMER0->EVENTS_COMPARE[0]=0; }

    main() { NRF_GPIO->OUTSET=1<<19; timer0_init(); }

    this codes works in normal application. but when i added to ble_app_hrs by replacing NVIC from sd_nvic i am getting advertisement but controller is not going to TIMER0_IRQHandler after 5 seconds.

    Regards Balaji

Children
No Data
Related