xItemValue of xEventListItem in TCB was crashed using Event Group

wirelessguy wrote on Tuesday, October 23, 2018:

Hi Team,
I met an issue when I’m using FreeRTOS v10 version.

I have 7 tasks in created in my software, each task create an Event Group handle.
For each task, the architect is the same.
I used xEventGroupWaitBits( xCreatedEventGroup,0x00FFFFFF,pdTRUE,pdFALSE,portMAX_DELAY ) at the beginning of each task to wait for the event received in block state.
If any event received for this task, xEventGroupWaitBits will return and do the related event processing.

At the beginning, the sw running well. But after running for while, the event group function for the application task(Lowest priority) didn’t work. But for other task, the event group function work well.

I did further investigation on the event group function. I found the xItemValue of xEventListItem in Application TCB was changed to 0x00000007, the right value is 0x81FFFFFF(when running well).

Then I check the event group handle of application layer event group, I found the uxNumberOfItems in ( EventGroup_t * ) xAppEventGroup->uxNumberOfItems = 0x00. So when running the xEventGroupSetBits function, it will run into while( pxListItem != pxListEnd ) and can’t set the right bits for application task.
The right value is 0x01 when the sw running well.

One more info is, in my system there is a GPIO interrupt happend frequenctly, so the application task may interrupt by ISR and other higher priority tasks.

Could someone help to check what’s the issue caused.

Thanks a lot.

rtel wrote on Tuesday, October 23, 2018:

I suspect I’m going to need a lot more information to assist fully - but
to start off can you please say which FreeRTOS port you are using (chip
and compiler), and attach (rather than past into the post) your
FreeRTOSConfig.h file. Thanks.

wirelessguy wrote on Tuesday, October 23, 2018:

Hi Richard,
I’m using Cortex-M0 core device and using the FreeRTOS v10.0.1 version.
Can I send the FreeRTOSConfg.h seperated to you?

My highest priority task will frequently set the Event bits, maybe set several times on the same bit. I’m not sure if this will affect the application’s Event Group handle process.


rtel wrote on Tuesday, October 23, 2018:

You can send the config file to r dot barry at freertos dot org.

wirelessguy wrote on Wednesday, October 24, 2018:

Hi Richard,
Thanks. Btw, Could you point out where I can further debug and test about this issue.