Other Parts Discussed in Thread: CC3220SF, CC3200
Tool/software: TI C/C++ Compiler
Team,
We have few queries regarding usage of Watchdog in CC3220 and these are necessary to build a stable system which recover always from a crash. Appreciate if you could help us understand these in details and please let us know if there are any best practises for using Watchdog in CC3220. The example works well, however we have a multi-threaded application and hence the implementation is a little complex.
- Is it advisable to start Watchdog in the main thread itself i.e from int main(void) soon after Board_initGeneral() and before initialising any other threads.
- If Watchdog has to be started in a separate detached thread, should it have the least priority (1) and is the stack size 1024 sufficient as shown in the example ?
- Is it fine to increase the timeout / reload interval of watchdog to 5 seconds ? I have other threads which loops around 3 to 4 seconds, hence 5 seconds seems to be optimal.
- Does the callback function always need a while (1) {} loop ?
- In our multi-threaded application, we use a kicker thread which checks the health of all other threads and when true clears the watchdog interrupt. Is this approach correct and if so, what should be the ideal priority for this thread?
- The watchdog.c example shows clearing interrupt twice i.e after Power_disablePolicy() and after Power_enablePolicy(). Is this necessary always. Could you please explain this usage ?
- Will the while(1) {} usage in the application (mostly used to handle errors) trigger the watchdog reset ?
- Is the watchdog guaranteed to do a full reset on CC3220 during a timeout ? Are there any additional considerations or steps to be followed ?
- Are there any cases when the watchdog might fail like due to an application error, memory issues or some h/w related troubles?
Really appreciate your help.
Zac