This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to start different task in one Programm

Hello new's group.
My MCU is a ADuC7026. It has only two interrupt priorities, FIQ is high priority, IRQ is normal priority.
I want to write a programm to generate some signals which are related to some sensor mesurements. Some of my cumputations are very resource killing. So this computations can only be performed not so often.
So there are different task.
The task with the highest priority has to be performed 200000 times per second. Another task with a middle priority has to be performed 25000 times per second. The next task with a mid-low priority has to be performed 2000 times per second. And one more task is to be performed 100 times per second. And the last task has to be performed 2 times per second with the lowest priority.

I hope i have explained this so someone can understand it. Of course maybe this is not the right Forum, but i use a keil compiler. My question is how can i programm all this different task without a operating system?
Sorry, i'm not very experienced... :-)

Parents
  • Georg,
    your computation budget seems very tight. if your processor was doing nothing but the highest priority task, it would have to spend not more that 5 microseconds executing it before the next execution cycle. this period becomes even tighter when considering the total of 227102 times per second your tasks must do "something". that leaves you 1000000/227102 = 4.4 microseconds per task. now, with a rough estimate of 0.125 microsecond needed per instruction (that of course depends greatly on your specific MCU settings and if probably more, if you call functions or access external RAM...), you can run up to about 35 instruction per task before the next calculation must be performed. that is indeed tight, but you can try...

Reply
  • Georg,
    your computation budget seems very tight. if your processor was doing nothing but the highest priority task, it would have to spend not more that 5 microseconds executing it before the next execution cycle. this period becomes even tighter when considering the total of 227102 times per second your tasks must do "something". that leaves you 1000000/227102 = 4.4 microseconds per task. now, with a rough estimate of 0.125 microsecond needed per instruction (that of course depends greatly on your specific MCU settings and if probably more, if you call functions or access external RAM...), you can run up to about 35 instruction per task before the next calculation must be performed. that is indeed tight, but you can try...

Children
No data