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

Multplie Timers

Hi,

I need some clarification about how to create multiple Timer functions?

my application is to

1. read the VDD supply for every 10 sec

2. after BLE connected to mobile phone rssi value read for every 5 sec

3. need to read the sensor data for every 2 sec

and also i need to differentiate single button function like single press, double press and long press

I am using nRF52832 SDK15.3 in segger embedded studio .

Is there any predefined code for multiple Timer functions?

Parents Reply
  • Hi.

    The app_timer uses the RTC peripheral and the nrf_drv_timer uses the TIMER peripheral.

    The RTC peripheral uses the LFCLK (32.768 kHz), while the timer peripheral uses the HFCLK.

    Sunil vignesh said:

    I want to differentiate single press and long press to get system : Wakeup and Sleep mode.

    how to use app_timer to detect long press

     You have to configure it so that it fires on a long or a regular button press.

    typedef struct
    {
        bsp_event_t push_event;      /**< The event to fire on regular button press. */
        bsp_event_t long_push_event; /**< The event to fire on long button press. */
        bsp_event_t release_event;   /**< The event to fire on button release. */
    } bsp_button_event_cfg_t;
    

    Best regards,

    Andreas

Children
Related