We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm developing an app on an M3 that requires I run a run a periodic task every 500 microseconds. Currently I'm using a periferial timer and isr_evt_set to wakup my high priority task. This all works fine, but I'm wondering if I could just setup the systick for this higher rate and use os_ivt_wait for sleeping my task. My reasoning is RTX is already running its scheduling code every time I set the event flag from my timer ISR so would it not make sense just to have RTX tick at the same rate and just eliminate the extra timer ISR? What I don't want to do is create any extra overhead by having RTX tick at this higher rate. Opinions?
Thanks Mark
So I'm about to answer my own question. After doing a bit more reading specifically this thread http://www.keil.com/forum/20559/ I believe I will stick with my current design. However if anyone would like to discus further I'm all for it and would still appreciate opinions.
Cheers Mark
If the current design works, why change anything? Anyway, 500 microseconds sounds like too little to leave it to the RTOS scheduler. Surely it would make more sense to perform the task in a timer ISR?
The if it ain't broke don't fix it is a valid point. I'm still in development and just thinking about things still. RTX on my micro is having no problems waking up the high priority task within my time requirements. One reason I use a task is that the task does two quick SPI transfers instead of spin waiting for these transfers to complete my SPI driver is interrupt driven and my high priority task sleeps during the transfers giving more time to my low priority tasks, even though its only a hand full of microseconds. For good measure I should go back and make absolutely sure that the time sleeping and going through context switches is not more than just spin waiting.