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] [June 2016 Threads] Hard fault - SometimesPosted by joe_her on June 5, 2016 I have an extremely difficult to catch hard fault.
I suspect it happens somewhere during initialization, as if the system starts running it will run for days with no issues.
However, once in a while, a hard fault happens after reset.
I set a break point at the hard fault interrupt, and I can see that the call stack is empty, only shows "void f() ",
Can the FreeRTOS+ Trace be used to find out what is going on? My ARM assembly knowledge is very low.
Thanks for any help...
Johanan
Hard fault - SometimesPosted by rtel on June 5, 2016
I suspect it happens somewhere during initialization
FreeRTOS will leave interrupts disabled as soon as you start to call FreeRTOS API functions. That is done to ensure interrupts do not execute until after the scheduler has started, in case an interrupt service routine attempts to use the FreeRTOS API, and the API function called attempts a context switch (which would not make sense before any tasks were running).
If you are hitting a hard fault before the scheduler is started, could it be that something you are doing during initialisation is enabling interrupts?
Can you put a break point in your ISRs, or simply set a variable that can be inspected from the hard fault handler to see if any ISRs have executed, to see if this is the case?
Regards.
Hard fault - SometimesPosted by joe_her on June 6, 2016 I will set a counting variable on each interrupt entry, and will check.
Thanks.
Hard fault - SometimesPosted by joe_her on June 6, 2016 Can't believe did this, but I forgot to call one xEventGroupCreate() ...
I wonder how it worked at all sometimes.
Johanan
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|