Sdk bootup process

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

who can introduce sdk how to bootup,such as press power key ->bootloader->app.

0 Likes
1 Reply
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi,

Are you looking for detecting a GPIO state change that triggers the reboot?

Here is the sample code:

/*

* Copyright 2016, Broadcom Corporation

* All Rights Reserved.

*

* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;

* the contents of this file may not be disclosed to third parties, copied

* or duplicated in any form, in whole or in part, without the prior

* written permission of Broadcom Corporation.

*/

#include "wiced.h"

#include "wiced_framework.h"

void application_start( )

{

    /* Initialize the WICED device */

    wiced_init();

    WPRINT_APP_INFO( ( "Press WICED_BUTTON1 to reboot.\n" ) );

    while ( 1 )

    {

        if ( wiced_gpio_input_get( WICED_BUTTON1 ) == WICED_FALSE )

        {

            printf( "Rebooting...\n" );

            wiced_rtos_delay_milliseconds( 1000 );

            wiced_framework_reboot();

        }

        if ( wiced_gpio_input_get( WICED_BUTTON2 ) == WICED_FALSE )

        {

            WPRINT_APP_INFO( ( "WICED_BUTTON2 pressed.\n" ) );

        }

        wiced_rtos_delay_milliseconds( 250 );

    }

}

BR,

Seyhan