Soft reset to SN8200x

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

cross mob
Anonymous
Not applicable

Hi

How can I make soft reset (full system restart) from the Wiced software ?

I use SN8200x and winced 2.4.1

thx

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

Hi.

Please try this

#ifndef SCB_AIRCR_ADDRESS

    #define SCB_AIRCR_ADDRESS        ( 0xE000ED0C )

#endif

#ifndef SCB_AIRCR_VECTKEY

    #define SCB_AIRCR_VECTKEY        ( 0x5FA << 16 )

#endif

#ifndef SCB_AIRCR

    #define SCB_AIRCR                ( ( volatile unsigned long* ) SCB_AIRCR_ADDRESS )

#endif

#ifndef SCB_AIRCR_SYSRESETREQ

    #define SCB_AIRCR_SYSRESETREQ    ( 0x1 << 2 )

#endif

int reboot()

{

    WPRINT_APP_INFO( ( "Rebooting...\r\n" ) );

    /* Reboot the ARM Cortex M3 */

    *SCB_AIRCR = SCB_AIRCR_SYSRESETREQ | SCB_AIRCR_VECTKEY;

    /* Never reached */

    return 0;

}

Thanks,

Seyhan

View solution in original post

2 Replies
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi.

Please try this

#ifndef SCB_AIRCR_ADDRESS

    #define SCB_AIRCR_ADDRESS        ( 0xE000ED0C )

#endif

#ifndef SCB_AIRCR_VECTKEY

    #define SCB_AIRCR_VECTKEY        ( 0x5FA << 16 )

#endif

#ifndef SCB_AIRCR

    #define SCB_AIRCR                ( ( volatile unsigned long* ) SCB_AIRCR_ADDRESS )

#endif

#ifndef SCB_AIRCR_SYSRESETREQ

    #define SCB_AIRCR_SYSRESETREQ    ( 0x1 << 2 )

#endif

int reboot()

{

    WPRINT_APP_INFO( ( "Rebooting...\r\n" ) );

    /* Reboot the ARM Cortex M3 */

    *SCB_AIRCR = SCB_AIRCR_SYSRESETREQ | SCB_AIRCR_VECTKEY;

    /* Never reached */

    return 0;

}

Thanks,

Seyhan

Anonymous
Not applicable

work great.

thx