Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

PIC32MZ Assert/exception in vListInsertEnd()

Posted by jmmag on November 4, 2014

As a preface, I had typed up a lengthy post describing my methods for diagnosing this problem, but lost it without warning when the page navigated to the 'CodeHilite' documentation. So I apologize in advance if this initial post does not seem as detailed (or marked-up) as what it would have been.

Anyway, I have been encountering issues when sending messages from a DMA ISR to a task queue via xQueueSendFromISR(). The address error exception occurs at this line:

pxIndex->pxPrevious->pxNext = pxNewListItem;

and when debugging I see that the stack is indeed overflowing, but have tried a number of things to address the issue (increasing stack, configMAXSYSCALLINTERRUPT_PRIORITY, etc.) without much success. Any help would be appreciated.

Thanks, Jon


PIC32MZ Assert/exception in vListInsertEnd()

Posted by edwards3 on November 4, 2014

The PIC32 port uses configISRSTACKSIZE in FreeRTOSConfig.h to size the stack used by interrupts. Have you tried increasing that?


PIC32MZ Assert/exception in vListInsertEnd()

Posted by jmmag on November 4, 2014

Yes, I stopped at 8k; furthermore all of my ISR variables are either global or static and the queue element is only 4 ints in size. I have found a few different threads that deal with similar issues, but none seem to match mine exactly. Although, this post seems to describe my situation of the exponential stack usage, but the ISR flags aren't reset until after xQueueSendFromISR() finishes. So there should be no chance for recursion, at least above the hood.

Jon


PIC32MZ Assert/exception in vListInsertEnd()

Posted by rtel on November 4, 2014

There are two ways of defining interrupts on the PIC32. One uses the compiler syntax to get the compiler to generate the interrupt entry code, the other uses an assembly file wrapper to switch stacks on interrupt entry in order to save a lot of RAM. Which method are you using?

Regards .


PIC32MZ Assert/exception in vListInsertEnd()

Posted by jmmag on November 4, 2014

I am using the latter method of wrapping the InterruptHandler into the assembly InterruptWrapper just like all of the demos supplied by FreeRTOS & Microchip.

Another point worth mentioning is that the issue goes away when I decrease the interrupt frequency. Is it possible for an ISR to yield to its own interrupt if one happens before portENDSWITCHINGISR() exits? Perhaps I shouldn't be clearing the interrupt flag until I know for sure that the ISR has exited.


PIC32MZ Assert/exception in vListInsertEnd()

Posted by rtel on November 5, 2014

On a lot of architectures it would not be possible for an ISR to yield to its own interrupt, but I'm not sure on the MIPs. It depends on the interrupt controller implementation.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists