# event group

**URL:** <https://forums.freertos.org/t/event-group/3290>\
**Category:** Kernel\
**Created:** [February 10, 2014, 9:57pm UTC](https://forums.freertos.org/t/event-group/3290 "2014-02-10T21:57:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 10, 2014, 9:57pm UTC](https://forums.freertos.org/t/event-group/3290/1 "2014-02-10T21:57:50Z")

</div>

**[williamjsell](https://sourceforge.net/u/williamjsell/)** wrote on [Monday, February 10, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/8da8ed17/#8b58):

I have a call in my task:

```
    uxBits = xEventGroupWaitBits(
                xCalibrationGroup, //The event group being tested.
                CALIBRATE_4_20 | CALIBRATE_MCHAN |
                CALIBRATE_5VDC | CALIBRATE_10VDC | CALIBRATE_BDTEMP | CALIBRATE_RTD, //The bits within the event group to wait for
                pdFALSE, //bits are cleared after the module has been run
                pdFALSE, //any bit will cause the task to run
                xTicksToWait ); //Wait forever

```

When I start the scheduler, the task executes, but no bits are set. uxBits == 0x0. So I am not clear on the function of the event group, I thought it would allow for the task to process only when one of the flags was set.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [February 11, 2014, 10:37am UTC](https://forums.freertos.org/t/event-group/3290/2 "2014-02-11T10:37:41Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, February 11, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/8da8ed17/#5be4):

With the parameters set as shown, the task calling that code should remain in the Blocked state for a maximum of xTicksToWait for any one of the CALIBRATE\_4\_20, CALIBRATE\_MCHAN, CALIBRATE\_5VDC, CALIBRATE\_10VDC, CALIBRATE\_BDTEMP, CALIBRATE\_RTD bits to be set (assuming those constants are defined to single bit values).

Has the event group been created before you used it?  
How do you know uxBits is 0?  
What is xTicksToWait set to?

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 11, 2014, 11:39pm UTC](https://forums.freertos.org/t/event-group/3290/3 "2014-02-11T23:39:21Z")

</div>

**[williamjsell](https://sourceforge.net/u/williamjsell/)** wrote on [Tuesday, February 11, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/8da8ed17/#4f9f):

I had xTicksToWait set to 0, but I changed this to portMAX\_DELAY and now it is working…thanks!
