FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2013 Threads] Hangs on PIC32 uxPortSetInterruptMaskFromISRPosted by Coco on July 22, 2013 Hi, I just started using FreeRTOS ( PIC32 ) and got an issue once I call xSemaphoreGiveFromISR. I call this API from an interrupt that is set to priority 1. I narrow down the hang to the uxPortSetInterruptMaskFromISR, when it tries to _CP0_SET_STATUS. Couple of questions : 1. uxSavedStatusRegister = _CP0_GET_STATUS() | 0x01; Is this call really needed? when the interrupt happens, the IE bit should already set unless it is disable by the "asm volatile ("di")" ? Any idea what might cause the hang? What puzzling is the Timer tick interrupt is also running with priority 1 and it has no issue.
2. portALL_IPL_BITS is set to 0x3fUL. From what I read in PIC32 spec, the IPL bits are bit 10-12 (3bits), shouldn't this value be 0x7UL ?
Thanks.
RE: Hangs on PIC32 uxPortSetInterruptMaskFromISRPosted by Coco on July 22, 2013 Some update on issue 1, I found out the hang is caused by the interrupt bit is not yet cleared when I call that function. So as long as I clear the interrupt bit before calling the uxPortSetInterruptMaskFromISR , everything works fine.
RE: Hangs on PIC32 uxPortSetInterruptMaskFromISRPosted by Richard on July 22, 2013 Are you following the instructions in the "Interrupt Service Routines" section of the following page: http://www.freertos.org/port_PIC32_MIPS_MK4.html ? You should never find interrupts are disabled inside the interrupt handler unless you disabled them.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|