[quote user="URVI SHAH"]If I try to handle all tasks at a same time then device will either goes into fault isr or gives me watchdog interrupt.[/quote] Vendor's Charles nicely highlights, ' Stack and/or Heap Inadequacy ' as the 'usual suspects.' And indeed - that provides quick/eased, borderline painless 'fix.' In the event that the issue persists - and in honor of your request for a 'systematic procedure' to resolve - may I suggest: Carefully/Systematically - Remove (just one) of your multiple tasks - and then rerun your program Never (almost never) will the first task 'removed' prove the 'issue's cause' - it is thus (almost) certain that your 'issue' remains Re-enable that task (initially removed) and remove another task - again observing if the 'issue' is resolved Repeat this, 'Selective Removal & Test/Observe' - until each/every one of the multiple tasks have been so exercised The procedure described aims to determine the identity of 'one or perhaps even several' tasks - which 'cause your issue' This method employs the ' Process of Elimination ' - to systematically 'probe' for task failure(s). There's an even faster method to implement the above: Break your tasks into 'reasonably' equal halves - and disable/remove, 'One of those Halves' Run the program so that the issue's presence is tested Should the issue not occur - repeat the test - but only after 'swapping' the 'Task Halves.' (i.e. that task half which worked is now disabled - and the 'untested task half' is now tested.) In this manner - the following analysis results: if both 'task halves' PASS (no faults) - then Charles 'Stack/Heap' suggestion rises (even) higher if one & only one 'task half' fails - the issue is contained w/in 'One of that half's task inventory' if both 'task halves' FAIL - the 'Stack/Heap' may again prove 'guilty' in the case of 1 or 2 'task half' failures - employ the earlier (higher up) procedure - to determine the (likely) offending task(s) it often proves helpful to ' rearrange the order ' in which each task is called/sequenced - this enables the detection of ' Sequence Sensitivity ' which is (not) usually deemed a 'task fault.' (there are further systematic methods to 'tease out' sensitivity impacts - as well...)
↧