2024-03-20 03:20 PM
Hi
I use STM32H7 with free-rtos for my projct.
I need to synchonized analog samples reading from 2 DMA channels and from 2 different ADCs.
I use the xEventGroupWaitBits function to stop the execution of the sampling before starting a new sampling cycle.
DMA-ADC interrupts of both channels releasing the WAIT by the xEventGroupSetBitsFromISR command.
My problem is the time takes from the xEventGroupSetBitsFromISR (in the callbacks) until the xEventGroupWaitBits function resumes execuation - It takes 1ms which is much to much for my project. What can solve it ?
Thanks
2024-03-21 04:37 AM
Do you handle xHigherPriorityTaskWoken (naming in the example) to properly call portYIELD_FROM_ISR ?
On the other hand consider using task notifications as a faster alternative, since xEventGroupSetBitsFromISR uses the timer task which then signals/wakes up the task waiting for the event group. That causes a certain overhead which is avoided by using e.g. task notfications.
Of course the overall system load and your priority scheme is also important to tune the task response time/latency.
2024-03-31 02:54 PM
Thank you.
I will check it.