petervlna, I think I did not explain clearly what I am trying to achieve.
Currently: Every 100us Task_A and Task_B gets executes. CTU triggers ADC and upon ADC completing conversions, an interrupt is generated to take care of both the tasks.
Change Required: Now because of component change, Task_A needs to run at every 20us and Task_B needs to run at every 100us. With both solutions you suggested, no doubt I can get to execute Task_A at every 20us by triggering an interrupt; But I still need an interrupt to run Task_B at every 100us. I cannot simply execute this Task_B at every 5th instance of 20us interrupt because Task_B is longer than 20us. So, I need another lower priority interrupt to do Task_B.
How do I do that is my question.
Please suggest how do I achieve the above with those 2 solutions. Also, please tell me if my option stated above works as well.
Please let me know if you need anymore information.
Thanks,
Sagar