Hi,
while debugging another problem, I had to modify the SYS/BIOS sources to insert a hook for a conditional breakpoint. I activated the option to build SYS/BIOS from sources instead of using a pre-compiled library. This resulted in enabling asserts, which were previously not active.
While running my application, I got the following error:
ti.sysbios.knl.Semaphore: line 204: assertion failure: A_badContext: bad calling context. Must be called from a Task.
A quick Google search pointed me to this thread:
http://e2e.ti.com/support/embedded/bios/f/355/t/223605.aspx
According to this, semaphores may only be posted from task context. I couldn't believe that was the case, so I checked the SYS/BIOS manual. In section '3.2.5 Yielding and Preemption' it says:
"Semaphores can be posted from Hwis and Swis as well as from other tasks."
Could someone please clarify this? I have an application on which a team has been working for months and it depends on SWIs and HWIs performing post operations on semaphores to delegate work to tasks. I know that line 204 in 'semaphore.c' is in the 'Semaphore_pend' section and I will correct my code, but I want to be absolutely sure that my application is solid and not just working by chance.
Thanks
Torben Frenzel