cancel
Showing results for 
Search instead for 
Did you mean: 

F407 Hard Fault

qqAnton
Senior

Hello,

I am woking with CMSIS RTOS v1 on STM32F407 mcu,

and every time after ~30 mins my device gets haurd fault.

0690X00000ArsXKQAZ.png

void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
{
ListItem_t * const pxIndex = pxList->pxIndex; // <------- PC 0x08006f4c
 
	/* Only effective when configASSERT() is also defined, these tests may catch
	the list data structures being overwritten in memory.  They will not catch
	data errors caused by incorrect configuration or use of FreeRTOS. */
	listTEST_LIST_INTEGRITY( pxList );
	listTEST_LIST_ITEM_INTEGRITY( pxNewListItem );
 
	/* Insert a new list item into pxList, but rather than sort the list,
	makes the new list item the last item to be removed by a call to
	listGET_OWNER_OF_NEXT_ENTRY(). */
	pxNewListItem->pxNext = pxIndex;
	pxNewListItem->pxPrevious = pxIndex->pxPrevious;
 
	/* Only used during decision coverage testing. */
	mtCOVERAGE_TEST_DELAY();
 
	pxIndex->pxPrevious->pxNext = pxNewListItem;
	pxIndex->pxPrevious = pxNewListItem;
 
	/* Remember which list the item is in. */
	pxNewListItem->pvContainer = ( void * ) pxList;
 
	( pxList->uxNumberOfItems )++;
}

What is the reason of the problem?

Thank you,

Anton

4 REPLIES 4

Review linked list for corruption.

See if you can determine​ when it is going to fail, and alert. Output telemetry so you can understand flow immediately prior to failure.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Ozone
Lead

I tend to agree.

Faults after such a long time tend to be caused by either out-of-bound access, or rare interrupt race conditions.

I would say, check the pointer operations of your lists, perhaps via telemetry output.

Thank you for the answer,

This is the list used by freertos, so I don't understand how I can check his operations

Thank you for the answer,

If I use two uarts with the same interrupt priority could it be the problem?

Or if I try to write in one buffer from two threads?​