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

RTX periodic task design

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

Parents Reply Children
  • 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.