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.

AM6442: Usage of Driver Porting Layer encapsulated FreeRTOS functions instead usage of native FreeRTOS API functions in a user application

Part Number: AM6442

Tool/software:

Hello TI support Team,

we develop a FreeRTOS based user application with the mcu_plus_sdk_am64x... on the four r5f processors.
TI does not recommend using the DPL functions instead usage of native FreeRTOS  API-funcitons, see picture below.

We includes also the Tiny USB middleware. But the Tiny USB example in the SDK folder

C:\ti\mcu_plus_sdk_am64x_09_01_00_41\examples\usb\device\cdc_echo\cdc_echo_freertos.c

makes use of DPL functions.

1. Is the reason that the cdc_echo_freertos.c example uses DPL functions, the easier management of the SDK by the SDK developer team?


2.. Does the cdc_echo_freertos.c example in the application also have to be implemented in DPL (but not recommended in the AM64x SDK)?


3. It is highly recommended to use the native FreeRTOS-API instead the DPL task functions in a big user application?


With best regards
Steffen Weiß

  • Hello Steffen,

    Thanks for your query.

    I have taken your inputs and working on it.

    Please allow some time to revert back.

    Regards,

    Tushar

  • Hello Steffen,

    Thanks for your patience.

    1. Is the reason that the cdc_echo_freertos.c example uses DPL functions, the easier management of the SDK by the SDK developer team?

    Can you please tell which DPL function are you referring to?

    Also can you please tell from which documentation are you referring? I am not able to find the below note in MCU+SDK docs.

     

    Regards,

    Tushar

  • Hello Tushar,

    to 1. Is the reason that the cdc_echo_freertos.c example uses DPL functions, the easier management of the SDK by the SDK developer team?

    The point is that when you write a FreeRTOS application you don't use the FreeRTOS encapsulated task and semaphore DPL functions, other DPL functions do.

    The file "cdc_echo_freertos.c" does not use freeRTOS API functions, instead driver porting layer encapsulated FreeRTOS functions hoiw "TaskP_construct" are called.

    From my point of view, this was only done by TI in the example because the Tiny USB example was written for different underlying OS (none OS, FreeRTOS, TIRTOS).
    Otherwise, in my opinion, DPL FreeRTOS functions such as "TaskP_construct" should not be used in an application application.

    Instead of "TaskP_construct", the FreeRTOS function "xTaskCreateStatic" should be used, see also main.c in this SDK example.
    "TaskP_construct" is a DPL function and this is reserved for SDK driver development.
    What is the preferred FreeRTOS-API, FreeRTOS self  or DPL Task functions, DPL Semaphore..., see also AM64x MCU+SDK 09.01.00 Dok.

    "DPL is not a full-feature Operating System Abstraction Layer (OSAL) ...,
    see also, on the page something down.

    https://dev.ti.com/tirex/explore/node?node=A__AMkGAZYqhtsWXGTKRJWMgg__com.ti.SIMPLELINK_ACADEMY_MSP432E4SDK__Nh7md.m__LATEST

    My question is
    3. It is highly recommended to use the native FreeRTOS-API instead the DPL task functions in a big user application?

    DPL Task API in the AM64xx SDK Doku.:

    With best regards
    Steffen Weiß

  • Hello Steffen,

    Thanks for your response.

    Is the reason that the cdc_echo_freertos.c example uses DPL functions, the easier management of the SDK by the SDK developer team?

    There is no such restriction to use DPL API v/s FreeRTOS native API. You are free to use either DPL API or FreeRTOS API. It is recommended to use the DPL API's whenever possible. It provides more portability when moving from one OS to another.

    DPL is not a full-feature Operating System Abstraction Layer (OSAL) ...,
    see also, on the page something down.

    The above link provided is not correct in context of AM64x. The link provided is from the SimpleLink academy for MSP devices. Whatever DPL APIs that is present in the SDK is fully supported and recommended to use.

    It is highly recommended to use the native FreeRTOS-API instead the DPL task functions in a big user application?

    The DPL APIs provided as a part of SDK are just wrapper to the FreeRTOS API and should be used for portability when moving for one OS to another.

    Hope the above information helps.

    Regards, 

    Tushar