need to have time separate from main loop_stm32f407
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-09-19 6: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 advance- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-09-19 8: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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-09-19 9: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 them- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-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...A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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...A complex system designed from scratch never works and cannot be patched up to make it work.
