jmsmith86 wrote on Wednesday, November 25, 2015:
MCU: PIC32MX695F512L
FreeRTOS Version: 8.2.1
Like it says in the subject, I am getting into an infinite loop within vListInsert(). Here is what I know:
- configASSERT is defined
- ISR priorities are correct
- All interrupts are defined with SOFT
- Assembly interrupt wrappers are used with all interrupts where portSAVE_CONTEXT and portRESTORE_CONTEXT are executed
- Stack overflow checking is enabled
- Call to uxTaskGetStackHighWaterMark() on all tasks after crash return value greater than 100
- I’m fairly certain that the only places where enter/exit critical is used is when multiple values need to be set/retrieved atomically (no API functions executed)
- All queues and semaphores are properly initilized
The issue occurrs when I remove and insert a hot-swappable device several times. I traced the issue to a function which calls xQueueSendToBackFromISR(). I have verified that this is indeed always being called from an ISR. Everything works fine once I remove that function call. There are other calls within the same ISR which access the same queue with no issues. I can do without that line of code, so removing it would not be a problem to me. However, it concerns me that I don’t understand the reason why this would be causing a crash. Is there anything else that I can do to figure out what is happening?