This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: RTOS: SemaphoreP and Semaphore

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: SYSBIOS

While working on FATFS via TIRTOS_Tiva driver, I note it uses SemaphoreP within the Port folder. How this compares with Semaphore ie SemaphoreP_create(), etc versa Semaphore_create().

I have looked around documentation and google and could not find material that explains the difference and when to use it and why FATFS TI support code adopted Port library kit than main library kit (in context of semaphore and other). Any reference to the material would be helpful. 

How to control the priority of the task between them and when to decide to use port than kernal?

 #include <ti/sysbios/knl/Semaphore.h>

and

 #include <ti/drivers/ports/SemaphoreP.h>

  • Hi Richard,

      I'm not a TI-RTOS expert. This is the first time I'm seeing SemaphoreP_create() instead of Semaphore_create(). Doing some searches for SemaphoreP_create(), I can only find them in the context of CC13xx and CC26xx processors as in below link.

    https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/2_20_01_08/exports/tirtos_full_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/docs/doxygen/html/_semaphore_p_8h.html

    If I search for semaphoreP_create() in the forum I will mostly find it in the context of either processor forum and wifi forum.  Although I cannot explain the differences between Semaphore and SemaphoreP, I tend to think the differences would be minor. Perhaps SemaphoreP is a branch off Semaphore targeting a specific SDK version for a different family of TI processors only. With that said, I will choose Semaphore instead of SemaphoreP.  I have used Semaphore myself for Tiva MCU. As I mentioned, it is my first time hearing about SemaphoreP. 

    One more thing is that the support TI-RTOS version for Tiva MCU is 2.16.00.08 or 2.16.01.14. You should not use any higher versions for Tiva. If you download 2.16.00.08, the TI-RTOS kernel user's guide in the /doc directory will only mention about Semaphore, not SemaphoreP. Therefore, I will strongly suggest you stay with Semaphore only.

  • I'm familiar with the TIVA package for some time, the version issue has been previously discussed from my forum and we settled to 2_16_01_14. The TI appeared to cease support for TM4C so this will be the last project using the TM4C series and may drift to CCxxxx or perhaps the STM Cortex family.

    The FATFS use SemaphoreP for re-entrant purposes and after inspection of the codes it turned out to be a wrapper of Kernal Semaphore, nothing more. 

    Thank you for the quick reply and wishing you a nice thanksgiving weekend.