TI E2E Community
Statement does not time out: status = SEM_pend(&SEM0, 10);
Using BIOS 5.41.04.18, CCS 22.214.171.124, Code Generation Tools: v6.1.16, Target Processor OMAP2430 IVA core
I have a BIOS thread of priority 1 and I have a BIOS semaphore statically created. My taskis run upon start-up. When it gets to the SEM_pend(&SEM0,10) statement, it never times out.
A workaround that I found that works is to create second task within the IDL running at priority 0 and a second semaphore. This Idle task only signals this second semaphore. Now if I put a second "SEM_pend(&SEM2, SYS_FOREVER) at the top of my priority 1 task, then the SEM_pend(&SEM0,10) will time out as expected.
Is there a better way, or a more proper way?
Usually when timeouts don't work, it's because the user has not enabled the CLK manager, or the CLK module is not set up to drive the system clock. Have you checked that?
I couldn't really make sense of your description of what's going on. And I didn't understand what you meant by "create second task within the IDL".
One thing you might try is to run the semaphore example that comes with BIOS. I don't believe it has a timeout value specified in the SEM_pend() call, but you could just put a timeout value in there to see if it works.
I tried the example in: C:\CCStudio_v3.3\bios_5_41_04_18\packages\ti\bios\examples\basic\mutex and I modified it with a wait as in my other program and it did not freeze at the SEM_pend(xxx,10) call. I will look further into my program to see what the differences there between the two. Thanks
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.