2014-09-19 06:30 AM
hi every body
in my program i need to do somethings in specific time , this ''time'' is not equal all the time.for example for doing first job i need to do it 5 sec after a flag become set. and after that i need to make it zero and after that doing second job when this timer is more than 3secthis timer has not stop ever . it has to count separately from the any other part of cpu.and it should be as much accurate as counting milisecond.note in this case i cant use Systick because i using it for something else.thanks in advance2014-09-19 08:09 AM
And why can't you use an RTOS, or schedule it with the SysTick, or another timer? All the clocks here are synchronous, and clocking at sub-microsecond granularity.
2014-09-19 09:41 AM
i know it would be ok if i use RTOS , but i don't know any thing about RTOS, and somehow i fear of ROTS because the lack of knowledge. i don't know how should i compile my code beside RTOS .
as much as i go deep on my code i feeling lack of threads. if it was in computer i just used threads , semaphore and ..... i know that these problems has solved by RTOS. but i don't know about them2014-09-19 12:40 PM
''i don't know any thing about RTOS''
Time to start learning, then...?!Or just do it on a timer - as clive1 also suggested...2014-09-19 12:44 PM
''i cant use Systick because i using it for something else''
But one of the key applications of SysTick is as the timebase for the entire system - so perhaps you have a poor design if this one use of SysTick precludes all else?Anyhow, other timers are also available...