Skip to main content
Graduate II
March 20, 2024
Question

xEventGroupWaitBits function usning

  • March 20, 2024
  • 1 reply
  • 1547 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.

    1 reply

    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.

    OferAuthor
    Graduate II
    March 31, 2024

    Thank you.

    I will check it.