I’m using FreeRTOS v9.0.0 on CortexA7.
RAM address starts at 0xF1000000
There are 7 tasks and i use interrupt.
configMAX_API_CALL_INTERRUPT_PRIORITY is 10.
I use xEventGroupSetBits(), xEventGroupSetBitsFromISR(), xEventGroupWaitBits() repeatedly.
It’s working fine. But at any moment data abort exception occurs in uxListRemove().
In uxListRemove(), pxList is set to NULL because pxItemToRemove->pvContainer is NULL.
Please refer to the below function.
UBaseTypet uxListRemove( ListItemt const pxItemToRemove )
{
/ The list item knows which list it is in. Obtain the list from the list
item. /
Listt const pxList = ( Listt ) pxItemToRemove->pvContainer;
It is dereferenced in below statements.
*/ Make sure the index is left pointing to a valid item. /
if( pxList->pxIndex == pxItemToRemove )
{
pxList->pxIndex = pxItemToRemove->pxPrevious;
The value of ListItem_t pxItemToRemove immediately before the exception is:
This is callstack when pxItemToRemove->pvContainer is NULL.
xEventGroupWaitBits() -> vTaskPlaceOnUnorderedEventList() -> prvAddCurrentTaskToDelayedList() -> uxListRemove()
I don’t know why pxItemToRemove->pvContainer is NULL in uxListRemove()?
Could you advice to me about this problem?
Hello, Richard
Thank you very much for your reply.
I think (pxItemToRemove->pvContainer) value should be address of a List.(0xF100```)
I think I solved this problem now temporary.
There was a problem about entering critical section.
I use vPortEnterCritical() function for enterting critical section.
vPortEnterCritical() calls the ulPortSetInterruptMask().
ulPortSetInterruptMask() disables interrupt and sets portICCPMR_PRIORITY_MASK_REGISTER.
And then it enables interrupt.
I think critical section is not protected becasue interrupt is enabled.
I blocked enabling interrupt in ulPortSetInterruptMask().
And I confirmed the problem is solved.