FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [May 2015 Threads] HardFault at the call of vListInsertEndPosted by sbwox on May 19, 2015 Hi there,
I'm having a Hard Fault while the vListInsertEnd function is called.
The program currently just runs two takes: Main Task gives every second a semaphore so that Task2 can run. I have disabled all IRQ to be sure that is not a IRQ priority issue. I have also increase the size of the stack for each task to be sure that there is no stack overflow. Do you have some other idea to debug this hard fault ?
PS: I'm running FreeRTOS 8.0.1 on a samr21 from atmel (cortex-M0+)
Many thanks
HardFault at the call of vListInsertEndPosted by rtel on May 19, 2015
What is executing when the hard fault occurs - there are many calls to vListInsertEnd() in the code - what is the call stack?
Is this repeatable?
Does this occur the first time you give the semaphore, or does it run for a while before the problem occurs?
Do you have configASSERT() defined?
Have you read through the "my application does not run, what could be wrong" page of the FAQ?
HardFault at the call of vListInsertEndPosted by sbwox on May 19, 2015 The problem is very repeatable. The application is running properly for two semaphore give/take cycle. It does the following:
- Main task gives Semaphore
- Task2 takes Semaphore
- Task2 waits for Semaphore
- Main task gives Semaphore
- Task2 takes Semaphore
- Hard fault
Here is my call stack :
> HardFaultHandlerC:368(hardfaultargs=0x20005fa8)
> :368()
> vListInsertEnd:104(pxList=0xa002ec90, pxNewListItem=0x200021fc )
> xTaskIncrementTick:1937()
> SysTick_Handler:344()
> :344()
> ucHeap:344()
No configAssert are defined in the vListInsertEnd() function.
Thanks
HardFault at the call of vListInsertEndPosted by rtel on May 19, 2015 No - there are no asserts in the vListInsertEnd() function - but there
are plenty of asserts elsewhere in the code that might trap whatever has
gone wrong before vListInsertEnd() was called.
You didn't say if you have configASSERT() defined.
Regards.
HardFault at the call of vListInsertEndPosted by sbwox on May 19, 2015 configASSERT is defined as follow
define configASSERT( x )
if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
But does not trap the problem
Many thanks
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|