cancel
Showing results for 
Search instead for 
Did you mean: 

xEventGroupWaitBits function usning

Ofer
Associate III

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

2 REPLIES 2
hs2
Senior

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.

Ofer
Associate III

Thank you.

I will check it.