Getting unaligned exception on CM4 without FPU

Hi, I am getting unaligned exception(Usage fault) in function vListInsertEnd exaclty at below mentioned statement, pxNewListItem->pxPrevious = pxIndex->pxPrevious; However when i remove portYIELDFROMISR and taskYIELD from my task code, the frequency of the above exception reduces. I am developing a product related to networking and i am receiving high number of interrupts. I offload the packet processing to the task from the interrupt handler using Queues. Do anyone have any idea about the possible issue? I suspect memory corruption but i am not getting any pointers to move ahead in debugging. Thanks, Jags

Getting unaligned exception on CM4 without FPU

Yes, I expect memory corruption too, accessing pxNewListItem or writing to pxNewListItem->pxPrevious, or accessing pxIndex must be causing the exception, which would indicate that one of those three have been corrupted. First the normal pointers, which I suspect you will have looked at already:
  • Do you have configASSERT() defined?
  • Do you have stack overflow checking set to 2?
  • Are you using a recent version of FreeRTOS, as the more recent the more assert() points there are to catch interrupt priority problems. The head revision from SVN is recommended there as it will assert() on just about all misconigurations now.
Links can be found on this page: http://www.freertos.org/FAQHelp.html Then, are you sure your interrupt stack is large enough? Interrupts use the same stack as main(), so the stack set up by your C run time, often in the linker script (depending on the tools). Overflows in the stack used by interrupts will not be caught by the stack overflow detection.