Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CC3220SF-LAUNCHXL: SDKv3.30: Timer_open returns NULL adding at mqtt_client example program?

$
0
0

Part Number: CC3220SF-LAUNCHXL

Hi,

I am trying to add a 3 second timer at mqtt_client_app.c mainThread. I just copy the Timer code from timer example program. At Timer_open returns NULL. What could be causing this.

    Timer_init();

    /* Setting up the timer in continuous callback mode that calls the callback
     * function every 1,000,000 microseconds, or 1 second.
     */
    Timer_Params_init(&params);
    params.period = 3000000;
    params.periodUnits = Timer_PERIOD_US;
    params.timerMode = Timer_CONTINUOUS_CALLBACK;
    params.timerCallback = timerCallback;

    timer0 = Timer_open(CONFIG_TIMER_0, &params);

    if (timer0 == NULL) {
        /* Failed to initialized timer */
        while (1);
    }

    if (Timer_start(timer0) == Timer_STATUS_ERROR) {
        /* Failed to start timer */
        while (1);
    }


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>