Control is going to Hardfault handler

Hi,

I am working on freertos. As a continuation of the thread Sending Data from ISR to one Task and sending to another task with two queues
I have created new thread for this problem.

The code is running for some time and getting stopped after that. To know that I have run the program in debug mode. The control is going into Hard fault Handler.

Here is the disassembly code screenshot for first signal handler and second signal handler

Let me know anything to look after.

First comment, the addresses “FFFFFFFD” and “FFFFFFF1” are special codes that interrupts/trap use, and not really addresses. The FFFFFFFD means that when tracing back, you really should switch back from the interrupt stack to the main program stack (which many debuggers unfortunately aren’t smart enough to do).

One thing to make sure you do is define configASSERT in a way that you can tell if it gets called, which typically means having it disable interrupts and then going into an infinite loop. This will have FreeRTOS check a number of aspects of the setup to find a number of the common problems. One very common problem is using FreeRTOS functions in an ISR with to high of a priority (too small of a value), which makes the critical sections non-functional, and some of the data structures inside FreeRTOS get corrupted.