cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Combo

Anonymous
Not applicable

Hi Folks,

I am evaluating WICED WiFi 94390WCD2.

The evaluation board has "RESET" button to reboot.

I call this as "hard reset" since I have to press the button to reboot.

Can I implement "soft reset" in my application code?

I try to find out the function like reboot or jump to crt0, but I couldn't find it.

Please anybody give an anser for what function I have to call.

Thanks,

Joon

0 Likes
1 Solution
SeyhanA_31
Employee

Hi,

Soft reset for 4390 will be fixed with SDK-3.1.1 release.

Thanks,
Seyhan

View solution in original post

9 Replies
GregG_16
Employee

The test.console app has a "reboot" command. Maybe he can re-purpose that?

Capture.JPG

0 Likes
Anonymous
Not applicable

Hi gangi,

Platform BCM4390 is different from BCM43362.

ARM Cortex M3 & M4 can use the reboot function below.

/* Reboot the ARM Cortex M3 */
*SCB_AIRCR = SCB_AIRCR_SYSRESETREQ | SCB_AIRCR_VECTKEY;

I don't know what I do in 4390 platform.

Anyway thanks for your interest.

Joon

0 Likes
GregG_16
Employee

Console App on 4390 allows for soft Reboot also:

Capture.JPG

0 Likes
Anonymous
Not applicable

The 4390 applications processor is a ARM Cortex M3 and so the standard Cortex M3 registers should function as documented by ARM.

Anonymous
Not applicable

Hi nikvh,

I tried to reboot in my application as follows.

/*---------------------------------------------------------------------------*/
/* from "Platform/common/ARM_Cortex_M3/crt0_gcc.c" */
#ifndef SCB_AIRCR_ADDRESS
    #define SCB_AIRCR_ADDRESS        ( 0xE000ED0C )
#endif /* SCB_AIRCR_ADDRESS */
#ifndef SCB_AIRCR_VECTKEY
    #define SCB_AIRCR_VECTKEY        ( 0x5FA << 16 )
#endif /* SCB_AIRCR_VECTKEY */
#ifndef SCB_AIRCR
    #define SCB_AIRCR                ( ( volatile unsigned long* ) SCB_AIRCR_ADDRESS )
#endif /* SCB_AIRCR */
#ifndef SCB_AIRCR_SYSRESETREQ
    #define SCB_AIRCR_SYSRESETREQ    ( 0x1 << 2 )
#endif /* SCB_AIRCR_SYSRESETREQ */
/*---------------------------------------------------------------------------*/

static int reboot( void )
{
    WPRINT_APP_INFO( ( "Rebooting...\n" ) );
    host_rtos_delay_milliseconds( 1000 );

    /* Reboot the ARM Cortex M3 */
    *SCB_AIRCR = SCB_AIRCR_SYSRESETREQ | SCB_AIRCR_VECTKEY;

    /* Never reached */
    return 0;
}

void application_start( )
{
    /* Initialize the device */
    wiced_init( );

    while(1) {
        static int count = 0;
        printf("%s: count %d\n\r", __func__, count);
        if( count++ > 10 )
            reboot();

        sys_msleep(1000);
    }
}

My "Make Target" is "snip.reboot-BCM94390WCD2-FreeRTOS-LwIP download run".

The output console message is as follows.

Platform BCM94390WCD2 initialised

Started FreeRTOS v7.5.2

Initialising LwIP v1.4.0.rc1

Starting Wiced v3.0.DEVELOPMENT

WWD SoC/4390 interface initialised

WLAN MAC Address : 02:0A:F7:9D:15:E7

WLAN Firmware    : wl0: Dec 18 2013 18:09:06 version 6.30 (TOB) (r)

application_start: count 0

application_start: count 1

application_start: count 2

application_start: count 3

application_start: count 4

application_start: count 5

application_start: count 6

application_start: count 7

application_start: count 8

application_start: count 9

application_start: count 10

application_start: count 11

Rebooting...

application_start: count 12

Rebooting...

application_start: count 13

Rebooting...

application_start: count 14

///////////////////////////////////////////////

This reboot function is at reboot.c of test.bt_smartbridge_console.reboot.

The bt_smartbridge_console.mk shows

VALID_PLATFORMS:= BCM9WCDPLUS114 \
                  BCM943341WCD1

Do I have to search for ARM Cortex M3 datasheet?

Thanks,

Joon

0 Likes
Anonymous
Not applicable

It looks like it is acting as one would expect it to act considering that your count variable is static.  I don't know that the reboot would necessarily re-initialize a previously initialized static variable.  To be sure its actually reseting, perhaps you should check for a 0 returned from your reboot function, and have a printf() statement to tell you you've reached it, something like:

static int reboot( void )
{
    WPRINT_APP_INFO( ( "Rebooting...\n" ) );
    host_rtos_delay_milliseconds( 1000 );

    /* Reboot the ARM Cortex M3 */
    *SCB_AIRCR = SCB_AIRCR_SYSRESETREQ | SCB_AIRCR_VECTKEY;

    /* Never reached */
    return 0;
}

void application_start( )
{
    /* Initialize the device */
    wiced_init( );

    while(1) {
        static int count = 0;
        printf("%s: count %d\n\r", __func__, count);
        if( count++ > 10 )

        {

            if (reboot() == 0)  printf("Should not reach\r\n");

        }

        sys_msleep(1000);
    }
}

0 Likes
Anonymous
Not applicable

Hi c g,

The declaration of static variable is just once initialized at compile time.

So the reboot function of your example should be called.

But it is problem that it is actually not rebooted. Just stopped.

Thanks,

Joon

0 Likes
SeyhanA_31
Employee

Hi,

We have created the issue on BCM4390 platform and working on it to resolve.

Thanks,

Seyhan

SeyhanA_31
Employee

Hi,

Soft reset for 4390 will be fixed with SDK-3.1.1 release.

Thanks,
Seyhan

View solution in original post