cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

Anonymous
Not applicable

Hi ,

The make target is demo.watchdog_example-ISM43362_M3G_L44 download run in SDK 3.1.2. I am trying to use the watchdog function wiced_watchdog_kick() to trigger the reset of the system. My code is below

void application_start( )

{

  

    /* Initialize Wiced system */

    wiced_init();

    WPRINT_APP_INFO(("kick watchdog..... \r\n"));

    wiced_watchdog_kick();

    while(1);

}

I also comment out the system_monitor_thread creation in  the  application_thread_main() of wiced_rtos.c. But the Inventek EVB never reboots after the watchdog timeout(22 seconds). Can you investigate this?

Thanks,

0 Likes
11 Replies
SeyhanA_31
Employee

Hi ,

Perhaps you are looking for the thread monitoring (/apps/snip/thread_monitor) snip application.

If this application is run in debug mode, it will break at below location.

PLATFORM_DEFINE_ISR( dbg_watchdog_irq )

{

    /* If the code breaks here, it means that the independent watchdog is about to bite.

    * Observe the Debug view and examine where the software gets stuck and why

    * the watchdog wasn't kicked.

    * Click "Resume" to continue and let the actual watchdog take effect.

    */

    TIM7->SR = (uint16_t)~TIM_IT_Update;

    WICED_TRIGGER_BREAKPOINT( );

}

The WICED_TRIGGER_BREAKPOINT( ) could be commented out to remove the break where the target would reset after watchdog is triggers.

Make target:

     snip.thread_monitor-BCM943362WCD4 download run

     or

     snip.thread_monitor-ISM43362_M3G_L44 download run

It was test using BCM943362WCD4 and it should work with ISM43362_M3G_L44 as well.

Seyhan

0 Likes
Anonymous
Not applicable

Hi,

I am not using the thread monitoring (/apps/snip/thread_monitor) snip application. I even can't see the /apps/snip/thread_monitor in my SDK 3.1.2. my application code is below

void application_start( )

{

 

    /* Initialize Wiced system */

    wiced_init();

    WPRINT_APP_INFO(("kick watchdog..... \r\n"));

    wiced_watchdog_kick();

    while(1);

}

But the Inventek EVB never reboots after the max watchdog timeout. Can you investigate this?


Thanks

0 Likes
SeyhanA_31
Employee

Hi,

Here is thread_monitor snip application.

Seyhan

0 Likes
Anonymous
Not applicable

Hi,

I can compile and download the thread_monitor example. But the watchdog never bites and the WICED eval board cannot reboot. Below is the output from the windows terminal.

Registering my thread monitor

Do some work

Updating monitor: 0

Do some work

Updating monitor: 1

Do some work

0 Likes
DiBa_1995216
New Contributor II

I have determined why the watchdog doesn’t trigger reset. The watchdog being used by WICED
is the STM32 Independent Watchdog (IWDG) which does not reset the MCU. You need to implement the Window
Watchdog Timer (WWDG) which when it triggers will cause a reset.

0 Likes
Anonymous
Not applicable

Hi,

Current watchdog in SDK 3.1.2 has been implemented using Independent Watchdog (IWDG), but my test shows that it doesn't work. See my email above. How can you says the Window Watchdog Timer (WWDG) can trigger the reset. If yes, can you post your implementation code?


Thanks

0 Likes
Anonymous
Not applicable

Hi,

Can you run the thread_monitor example using the BCM943362WCD4 EVB?  What is the result?  The watchdog can trigger the reboot? Our project was stuck at this issue.

Thanks

0 Likes
SeyhanA_31
Employee

Hi,

Run the attached thread_monitor snippet application using WICED SDK-3.1.2 on the BCM943362WCD4 platform and following is the terminal output with the below change:

PLATFORM_DEFINE_ISR( dbg_watchdog_irq )

{

    /* If the code breaks here, it means that the independent watchdog is about to bite.

    * Observe the Debug view and examine where the software gets stuck and why

    * the watchdog wasn't kicked.

    * Click "Resume" to continue and let the actual watchdog take effect.

    */

    TIM7->SR = (uint16_t)~TIM_IT_Update;

    //WICED_TRIGGER_BREAKPOINT( );

}

pastedImage_2.png

Below terminal output is with not commented out "WICED_TRIGGER_BREAKPOINT( );" where the handling is implemented as break point. It is meant to allow debugging if there is an issue with the implementation. It could be replaced with your own specific handler if needed.

pastedImage_3.png

Seyhan

Anonymous
Not applicable

Hi,

When I commented out "WICED_TRIGGER_BREAKPOINT( ). Watchdog can reboot the Inventel ECB. But it still cannot reboot my production board that is based on the Inventek EVB. Below is the terminal output. Any clue for this problem?


Registering my thread monitor

Do some work

Updating monitor: 0

Do some work

Updating monitor: 1

Do some work

Updating monitor: 2

Do some work

Updating monitor: 3

Do some work

Updating monitor: 4

Do some work

Updating monitor: 5

Do some work

Updating monitor: 6

Do some work

Updating monitor: 7

Do some work

Updating monitor: 8

Do some work

Updating monitor: 9

Uh oh, I'm about to watchdog because an unexpected delay occurred!

Do some work

Updating monitor: 10

Do some work

Updating monitor: 11

Do some work



Thanks

0 Likes
Anonymous
Not applicable

seyhan

Structure system_monitor need mutex?

AxLi_1746341
Honored Contributor

callmekart wrote:

seyhan    Structure system_monitor need mutex?

Both system_monitors[] and system_monitor need lock protection because they are accessed by multiple threads.

0 Likes