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 ?