Skip to main content
Ofer
Associate III
March 20, 2024
Question

xEventGroupWaitBits function usning

  • March 20, 2024
  • 2 replies
  • 1575 views

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

This topic has been closed for replies.

2 replies

hs2
Visitor II
March 21, 2024

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
OferAuthor
Associate III
March 31, 2024

Thank you.

I will check it.