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

Purpose of app_timer in NRF CLI library/example

Hello,

I am experimenting with the NRF CLI example (brilliant feature). I would like to integrate it with my project, which uses FreeRTOS.
I've read a few threads that suggest that it is quite difficult to integrate the CLI library with FreeRTOS (mostly because of the timer implementations).

However I noticed in the CLI library documentation (https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_cli.html#) that no timer is used.

My question is, what is the purpose of the app_timer in the NRF CLI example? Can the CLI library be used without the timer?

Thanks.

Parents
  • If I were you, I would tried to modify the code, remove the app_timer to see if it would run. 

    Another point I would like to show you, please read the definition off all the functions inside this function, you would find the answer.

    Regards,

        Duy

    static void buttons_leds_init(bool * p_erase_bonds)
    {
        bsp_event_t startup_event;
    
        APP_ERROR_CHECK(bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, bsp_event_handler));
    
        APP_ERROR_CHECK(bsp_btn_ble_init(NULL, &startup_event));
    
        *p_erase_bonds = (startup_event == BSP_EVENT_CLEAR_BONDING_DATA);
    }

Reply
  • If I were you, I would tried to modify the code, remove the app_timer to see if it would run. 

    Another point I would like to show you, please read the definition off all the functions inside this function, you would find the answer.

    Regards,

        Duy

    static void buttons_leds_init(bool * p_erase_bonds)
    {
        bsp_event_t startup_event;
    
        APP_ERROR_CHECK(bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, bsp_event_handler));
    
        APP_ERROR_CHECK(bsp_btn_ble_init(NULL, &startup_event));
    
        *p_erase_bonds = (startup_event == BSP_EVENT_CLEAR_BONDING_DATA);
    }

Children
No Data
Related