Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Another Crash in vListInsert() Topic

Posted by jmsmith86 on 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: 1. configASSERT is defined 2. ISR priorities are correct 3. All interrupts are defined with SOFT 4. Assembly interrupt wrappers are used with all interrupts where portSAVECONTEXT and portRESTORECONTEXT are executed 5. Stack overflow checking is enabled 6. Call to uxTaskGetStackHighWaterMark() on all tasks after crash return value greater than 100 7. 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) 8. 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?

Another Crash in vListInsert() Topic

Posted by rtel on November 25, 2015

All interrupts are defined with SOFT

What is SOFT?

Another Crash in vListInsert() Topic

Posted by jmsmith86 on November 25, 2015

I always seem to figure things out right after posting... The thing that was processing that queue item was doing something invalid. Of course it was number 7. There is potential for calling an API function while in a critical secion, which is what was happening. Oops! Sorry for the post.

Another Crash in vListInsert() Topic

Posted by jmsmith86 on November 25, 2015

That's Microchip's new ISR calling convention. The ISR can be declared "ISR1AUTO", "ISR1SRS", or "ISR1SOFT". I assume SOFT is more compatible with FreeRTOS, but I haven't read enough into it to understand what's what. It may have been superfluous information.

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

Meet Richard Barry and learn what's new in the FreeRTOS project at Embedded World 2019

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers



STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner