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

issuse abuout creating timer with nRF52 SDK_15.3.0 S112

Hi,I had a new project  base on nRF52810. I watnted to created a timer, but the note mentioned "increase the value of the macro APP_TIMER_MAX_TIMERS by one".I couldn't find the APP_TIMER_MAX_TIMERS. If the APP_TIMER_MAX_TIMERS is necessary, where I can find it.And the APP_TIMER_MAX_TIMERS should be ingored, Should I modify other paramters such as APP_TIMER_CONFIG_OP_QUEUE_SIZE?

static void timers_init(void)
{
// Initialize timer module.
ret_code_t err_code = app_timer_init();
APP_ERROR_CHECK(err_code);

// Create timers.

/* YOUR_JOB: Create any timers to be used by the application.
Below is an example of how to create a timer.
For every new timer needed, increase the value of the macro APP_TIMER_MAX_TIMERS by one.

err_code = app_timer_create(&m_app_timer_id, APP_TIMER_MODE_REPEATED, timer_timeout_handler);
APP_ERROR_CHECK(err_code); */
}

Parents Reply
  • Hi Simonr. I found max_timers below.But the app_timer_rtx.c is necessary.I had seen some examples, but both of them hadn't included this file.I just wanted to know I created 4or5 timers,which  paramter I need to modify.

    /**@brief Store an array of timers with configuration. */
    typedef struct
    {
    uint8_t max_timers; /**< The maximum number of timers*/
    uint32_t prescaler;
    app_timer_info_t * app_timers; /**< Pointer to table of timers*/
    }app_timer_control_t;

    app_timer_control_t app_timer_control;

Children
No Data
Related