cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

KEKA_4568351
Contributor

WPRINT_APP_INFO is used for the timer handler function for debugging, but the program operation may be strange after the WPRINT_APP_INFO debug display for the timer timeout.

When WPRINT_APP_INFO of the timer handler function was removed, the operation of the program became normal.

◆QA

Isn't it a problem to debug display such as WPRINT_APP_INFO in the timer handler function?

Please let me know if you have any problems.

◆example

static wiced_timer_t s_wifi_timer = { 0x00 };

static void timer_handler(void* arg)

{

    WPRINT_APP_INFO(("time out! ... %s(%d) \n", __func__, __LINE__));

    ・・・

}

void wifi_connect( void )

{

    /* timer init(60sec timeout) */

    wiced_rtos_init_timer(&s_wifi_timer, 60000, timer_handler, NULL);

    /* timer start */

    wiced_rtos_start_timer(&s_wifi_timer);

    while(1) {

        wiced_rtos_delay_milliseconds(1000);

    ・・・

        break;

    }

}

<japanese>

タイマーハンドラー関数のWPRINT_APP_INFOについて

タイマーハンドラー関数に、デバッグのため、WPRINT_APP_INFOを使用していますが

タイマーのタイムアウトに対して、WPRINT_APP_INFOのデバッグ表示後に

プログラムの動作がおかしくなることがあります。

タイマーハンドラー関数のWPRINT_APP_INFOを取り除くと、プログラムの動作に

異常がなくなりました。

◆QA

タイマーハンドラー関数に、WPRINT_APP_INFOなどのデバッグ表示を行っても問題ないでしょうか。

問題があるケースがありましたら、教えてください。

0 Likes
1 Solution
JoYi_1844281
Contributor II

I think you can't call the printf function (WPRINT_APP_INFO)  in timer task.

The timer task only allocated a couple hunderd bytes for it's stack.

Printf function is consumed a couple thousands byes from stack!

View solution in original post

0 Likes
1 Reply
JoYi_1844281
Contributor II

I think you can't call the printf function (WPRINT_APP_INFO)  in timer task.

The timer task only allocated a couple hunderd bytes for it's stack.

Printf function is consumed a couple thousands byes from stack!

View solution in original post

0 Likes