Error in vTaskPlaceOnEventList

ale82t wrote on Monday, March 29, 2010:

Hi to all,
using xQueueReceive inside a task for getting events generated from several ISRs that push the queue with xQueueSendFromISR, i saw that a fault occurs on my stm32 board . The error happens when
the istruction 
pxIndex->pxNext->pxPrevious = ( volatile xListItem * ) pxNewListItem
in vListInsertEnd called by  vTaskPlaceOnEventList
is executed few times. Why a memory access violation to the  pxIndex->pxNext->pxPrevious location happens ?

davedoors wrote on Monday, March 29, 2010:

Probably a problem with interrupt priority assignments.

Check the priority of all interrupts that use the FreeRTOS API are set to below configMAX_SYSCALL_INTERRUPT_PRIORITY (being below means having a higher value, so priority 255 is below priority 0). Next check that when you set the priority of the interrupt you are passing in the priority value in the way that the function expects. Some functions that set interrupt priorities expect the value to be passed in the least significant bits, while others expect the value to be shifted to the highest priority bits.

ale82t wrote on Monday, March 29, 2010:

thanks for your answer. I’m using freeRTOS on Cortex M3 so configMAX_SYSCALL_INTERRUPT_PRIORITY is set at the value 191(equivalent to 0xb0, or priority 11) and interrupts are set at the value 14. Through a led i saw i execute that function more than 250 times,so a part of a priority problem, are there other reasons for which i have a bus/hardfault?

ale82t wrote on Wednesday, March 31, 2010:

I resolved this problem.I had an old version of FreeRTOS(5.4.2) with the version 6.0.4 i don’t have this problem.