akhe wrote on Wednesday, November 26, 2008:
I received and send frames now which is a success. There is a problem though in the Tctcpip thread. It appears to be FreeRTOS related so I ask here. Quite complex to explain the problem byt here we go.
In the tcpip thread the code waits for a frame. This is done with
sys_mbox_fetch(mbox, (void *)&msg);
which is defined in the sys_arch.c When called I get an exception.
I have checked that the mbox has been initialized and can trace the fault to a list iteration in vListInsert (called in vTaskPlaceOnEventList)
for( pxIterator = ( xListItem * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext )
{
/* There is nothing to do here, we are just iterating to the
wanted insertion position. */
}
As I can see the list pointers are messed up as this point giving the exception. I have not been able to figure out why yet.
Call stack is
- tcpip_thread
- sys_mbox_fetch
- sys_arch_mbox_fetch
- xQueueGenericReceive
- vTaskPlaceOnEventList
Any hints appreciated.
Cheers
/Ake