I am not sure what my problem is but I have certain clues.
My interrupt post a semaphore.
This interrupt gets triggered about every 2ms for a period of around 50ms. The last time the interrupt gets triggered(from each 50ms group) must post a semaphore but for some reason I get an Unhandled Interrupt comming from shell task. It is like if the interrupt didnt have enough time to run before the next interrupt pulse comes. How can I overcome this?
The code works fine without posting the semaphore, like if the semaphore post instruction is making the interrupt too long. Could be this causing the problem?
void GPT_C0F_ISR(pointer dummy_param){ Door3Counter++; if(Door3Counter >= 26){//When is the last bit
Door3Counter = 0;//Reestart the counter
FifoInsertDataID(codeReadD3, 8); //Codigo y La Puerta _lwsem_post(&sem_cardRead); //Posts the semaphore
} readCounter(0); //Clears the Interrupt flag
return;}