I found an issue that ADC interrupt is missed in FreeRTOS on Zynq microZED board. ADC interrupt is configured to occur in every 8ms, and during compress test, I found sometime, ADC ISR is called in 15.99ms, that is, two interrupt period( no other interrupt period number is found in test) where one interrupt occurrence is stolen.
At beginning, I suspected taskENTER_CRITICAL() and taskEXIT_CRITICAL() cause ADC interrupt miss, because it will globally disable those interrupts whose priority is below configMAX_API_CALL_INTERRUPT_PRIORITY. But, it is not the case in my code, that define:
configMAX_API_CALL_INTERRUPT_PRIORITY = 18
ADC_interrupt_priority = 16
So, ADC interrupt shall not be disabled when entering critical section. One thing that I am not confortable is that I call xQueueSendFromISR() in ADC interupt ISR which shall not be called according to documents, but I don’t have any other choise if I want to notify application that ADC samples is readly.
Could you give me some suggestions about the issue? ADC interrupt miss is a disaster to the application. Thank you.