Chibios vs. Control Application what setup gives max speed
Posted: Thu Aug 21, 2014 9:58 am
Hi All,
my current project is a motion control application for my master thesis. i have a 32kHz PWM runninig triggering the ADC (Thanks Giovanni, this works now
). Every second cycle of the ADC measurering the ADC callback is called and signals an binary semaphore. The semaphore releases a task which calculates the control loop. This works fine so far on an STM32F3.
My Chibios is set up V3 standard with tickless mode. I thought when i get context switches with 16kHz why have a Systick permanently running. But i think Tickless mode is slower in context switching times due to the more complex scheduleing logic am i right?
Would i gain overall execution time when i setup lets say a 100Hz fixed Tick? Cause the rest of my application has no real need for performance.
I would like to stay with the setup with the sem triggering a control thread, to me it seems a good architecture, to give the os the control of this. If not i would have a 20µs and longer highest priority Interrupt, which whould be out of reach for the Os. And i would kill my Serial communication and other low prio things.
So how to setup the os correctly for a high freqency control algorithim?
Regards
Tec
my current project is a motion control application for my master thesis. i have a 32kHz PWM runninig triggering the ADC (Thanks Giovanni, this works now
My Chibios is set up V3 standard with tickless mode. I thought when i get context switches with 16kHz why have a Systick permanently running. But i think Tickless mode is slower in context switching times due to the more complex scheduleing logic am i right?
Would i gain overall execution time when i setup lets say a 100Hz fixed Tick? Cause the rest of my application has no real need for performance.
I would like to stay with the setup with the sem triggering a control thread, to me it seems a good architecture, to give the os the control of this. If not i would have a 20µs and longer highest priority Interrupt, which whould be out of reach for the Os. And i would kill my Serial communication and other low prio things.
So how to setup the os correctly for a high freqency control algorithim?
Regards
Tec