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.

RTOS: tirtos cmsis

Tool/software: TI-RTOS

Hi 

      I am using tirtos on my msp432 and want to migrate other rtos app codes to msp432.  So I'd like to know whether tirtos have cmsis package that make it convenient.

In addition, I can only find  semaphore  example on msp432 and no mutex example.  Since there are many mutex applications in my old app,  it really makes me crazy. 

If there is no existing example, could you give me any suggests?

  • Hi,

    Jufeng han said:
    So I'd like to know whether tirtos have cmsis package that make it convenient.

    Normally, if you start from the TI-RTOS empty example for your device, the CMSIS will add themselves to the project. You should be able to import the rest of your code quite easily.

    Jufeng han said:
    In addition, I can only find  semaphore  example on msp432 and no mutex example

    Which RTOS are you trying to migrate from?

    Depending on the OS that you used in the past, mutexes might not behave the same way.

    For example: FreeRTOS has recursive mutexes. Those cannot be used as regular mutexes in TI-RTOS. You would need GateMutexes.

    I suggest that you take a look at the following documentation:

    TI Resource Explorer:

    Open Software->TI-RTOS for MSP430->Documents->Documentation Links

    On that page, I recommend that you look at the following under the Kernel Documentation section

    • TI-RTOS Kernel User's Guide
    • TI-RTOS Kernel Runtime APIs and Configuration (cdoc)

    Don't hesitate to ask if you have any questions.

    Regards,

    Michel

  • As I was browsing the Resource Explorer, I found that there are mutex examples for TI-RTOS:
    Follow this path:
    Software->TI-RTOS for MSP430->Development Tools->MSP-EXP432Pxxx->Kernel Examples

    You can then open the Task Mutex Example.

    Regards,
    Michel
  • Hi,
    Thank you for your reply.
    I can find the only mutex example is in simplelink_msp432_sdk_1_30_00_40. However, it is achieved by semaphore.

    I can not visit TI Resource Explorer because of limit of proxy which makes me crazy since Ti resource is almost on the cloud. Can you give me the example file you mentioned?
  • Yes I want to migrate from Freertos. The example do have CMSIS , while I can not find any os related common interface, such as semaphore and mutex. For example "osMutexId osMutexCreate (const osMutexDef_t *mutex_def)" and "osStatus osSemaphoreRelease (osSemaphoreId semaphore_id)".
    So I have to replace the old interface with tirtos provided. Am I right? Any other suggestion can help?
  • Hi,

    TI-RTOS doesn't have mutex modules.

    A mutex is basically a binary semaphore (max count of 1).

    I have previously ported a FreeRTOS application to TI-RTOS and everything can be accomplished with TI-RTOS., you will need to find the equivalencies. Depending on what you want to achieve, you will have to use different strategies such as:

    • If you do not need to take a mutex recursively (such as in FreeRTOS), you can use a binary semaphore.
    • If you do need to acquire mutexes in a recursive fashion, you should look at the Gate_Mutex module.

    Gate mutexes allow to block access to certain parts of the code.

    If you have TI-RTOS installed on your computer, you should be able to find the same documentation (as in the resource explorer), in the following location:

    C:\<ti-rtos installation folder>\docs

    You should have a documentation overview html page.

    On that page, I recommend that you take a look at the Kernel User Guide and Kernel Runtime APIs.

    Regards,

    Michel

  • Michel,
    So can I understand that some freertos os related APIs that using CMSIS (e.g. semaphore create、mutex , etc.) can not imigrate to tirtos directly and must use tirtos provided API to instead. In other words, tirtos does not completely support RTOS related CMSIS.
  • Yes, that is correct.
    I am not sure what mechanisms TI-RTOS uses for semaphore and other synchronization modules, but you cannot directly migrate your application from FreeRTOS to TI-RTOS.
    Regards,
    Michel
  • I see. Thank you.