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 SemaphoreGiveFromISR() causes exception

Posted by pbjork on June 5, 2014

PIC32MZ2048ECH100, FreeRTOS0.8b, MPLABX 2.05, XC32 compiler v1.31.

Exceptions occur after several thousand successful ISR cycles exclusively in uxListRemove(), called from xTaskRemoveFromEventList() (which is several call levels down from SemaphoreGiveFromISR()). Either general or TLB exceptions may result. The pxEventList->uxNumberOfItems seems to be corrupted (or becomes very large), resulting in a null pxItemToRemove->pvContainer passed to uxListRemove(), which causes the exception.

I try to read the number of items to see if it is growing slowly, or just suddenly explodes, but it seems to go from typically 1 to a very large number suddenly.

Any ideas?


PIC32MZ SemaphoreGiveFromISR() causes exception

Posted by tlafleur on June 5, 2014

Just a note. I'm not using. xTaskRemoveFromEventList

Attachments

alternate (1773 bytes)

PIC32MZ SemaphoreGiveFromISR() causes exception

Posted by tlafleur on June 5, 2014

I'm using the same processor with 8.0 Xc1.31, mplab 2.10 have not had an issue with that function.

Pic32mz2048ech. Rev a3

Attachments

alternate (1867 bytes)

PIC32MZ SemaphoreGiveFromISR() causes exception

Posted by pbjork on June 5, 2014

If you're using SemaphoreGiveFromISR then that will eventually call xTaskRemoveFromEventList.

Yes, RevA3 on the processor.

BTW, this code was working on a PIC32MX part before I ported it to PIC32MZ.


PIC32MZ SemaphoreGiveFromISR() causes exception

Posted by rtel on June 5, 2014

Are you 100% sure the interrupt that is calling xSemaphoreGiveFromISR() has a priority at or below the priority set by configMAXSYSCALLINTERRUPT_PRIORITY? Do you have configASSERT() defined? If so then that should trap an incorrect interrupt priority provided you are using a recent version of FreeRTOS (you say you are using FreeRTOS 0.8b, I don't know what that is).

Regards, Richard Barry.


PIC32MZ SemaphoreGiveFromISR() causes exception

Posted by pbjork on June 5, 2014

Oh, sorry, it's FreeRTOS version 8.0.0 that was supplied with Microchip's Harmony 0.8b framework.


PIC32MZ SemaphoreGiveFromISR() causes exception

Posted by pbjork on June 5, 2014

Oh, sorry, it's FreeRTOS version 8.0.0 that was supplied with Microchip's Harmony 0.8b framework.

Ouch. For some kind of test I reset configMAXSYSCALLINTERRUPT_PRIORITY from 6 down to 3, then forgot to move it back, I have several interrupts up to level 6. I'll change it back and test.

I'll also look into configASSERT(). I haven't used it yet. Thank you Richard, for your prompt reply.

Paul


PIC32MZ SemaphoreGiveFromISR() causes exception

Posted by pbjork on June 5, 2014

So far so good. Problem appears to have gone away, at least over a test length about 10 times as long as what it took the exception to be thrown before.

Good call.


[ 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