I'm running on an OMAP-L138. I'm trying to do QDMA transfers, following the LLD example code. I have almost everything working, but I've run into a puzzling problem.
I have a callback set up to set a SEM when the transfer is complete. The call back is being called and calling HWI_isHWI shows that I am in HWI context. Most of the time when I call SEM_post(), the semaphore is posted and the ISR completes normally and once I am out of HWI context, the SEM_pend() completes in my task. However, sometimes (the same time every time in my particular application), the SEM_post() causes BIOS to switch to the SEM_pend() which completes before the ISR task exits. I'm then in non-HWI context, but I never finished my callback. This doesn't seem right to me, but I can't see anything I'm doing to cause it. I can't see why a SEM_post from and ISR should ever cause a task switch before completing the ISR. I believe that is what the old SEM_ipost() attempted to avoid, but that is no longer an option.
I'm running BIOS version 5.41.03.17. Is this a known bug? Am I doing something wrong?
Dave