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.

AM3359: OSAL layer HWIP integration

Part Number: AM3359

Hello Community,

I want to port PRUSS driver with Quadros OS. But, PRUSS driver is using API's from the osal/Hwip.h file. I want to know that what this API's are doing and how these are OS dependent.

regards,

Hiren Bhuva

  • Part Number: AM3359

    Hello Community,

    I am have ported pruss driver to Quadros os, but pruss driver is using osal api like PRUICSS_osalMuxIntcSetup().

    I am not able to understand what actually this api is doing ? and how can I port this to quadros os ?

    Any help will be appreciated.

    Regards,

    Pankaj

  • Hi Pankaj,

    High-level OSAL documentation is provided here: 

    A bit more detail concerning APIs can be obtained here: <PDK>\packages\ti\osal\docs\doxygen\html\index.html.

    The PRUICSS_osalMuxIntcSetup() function is a macro:

    From <PDK>/packages/ti:

    $ grep -rI -n -i --regexp="PRUICSS_osalMuxIntcSetup" --include "*.h" --include "*.c"
    drv/pruss/src/pruicss_intc.c:378: PRUICSS_osalMuxIntcSetup(&muxInParams, &muxOutParams);
    drv/pruss/src/pruicss_osal.h:116:#define PRUICSS_osalMuxIntcSetup(X, Y) (MuxIntcP_create((X), (Y)))

    From <PDK>/packages/ti/osal:

    $ grep -rI -n -i --regexp="MuxIntcP_create" --include "*.h"
    MuxIntcP.h:116:extern MuxIntcP_Status MuxIntcP_create(MuxIntcP_inParams *inParams, MuxIntcP_outParams *outParams);

    $ grep -rI -n -i --regexp="MuxIntcP_create" --include "*.c"
    src/nonos/muxintcp/v0/MuxIntcP_nonos.c:51:MuxIntcP_Status MuxIntcP_create(MuxIntcP_inParams *inParams, MuxIntcP_outParams *outParams)
    src/nonos/muxintcp/v1/MuxIntcP_nonos.c:49:MuxIntcP_Status MuxIntcP_create(MuxIntcP_inParams *inParams, MuxIntcP_outParams *outParams)
    src/tirtos/muxintcp/v0/MuxIntcP_tirtos.c:54:MuxIntcP_Status MuxIntcP_create(MuxIntcP_inParams *inParams, MuxIntcP_outParams *outParams)
    src/tirtos/muxintcp/v1/MuxIntcP_tirtos.c:52:MuxIntcP_Status MuxIntcP_create(MuxIntcP_inParams *inParams, MuxIntcP_outParams *outParams)

    I assume you desire to port the TI-RTOS version of the code. For AM335x, this is located in the "v1" version of the file (I determined this by inspecting <PDK>\packages\ti\osal\build\makefile_tirtos.mk). I've highlighted this version of the function above.

    Judging from the contents of src/tirtos/muxintcp/v1/MuxIntcP_tirtos.c which contains mostly empty functions, it appears the "MuxIntcP" API doesn't do much for AM335x.

    I suggest investigating other OSAL APIs in a similar manner.

    I can't comment specifically on requirements for Quadros OS.

    Regards,
    Frank

     

     

  • Hi Frank,

    Thanks for the solution.

    We want to know the actual use case of these files. For example what "HwiP_create()" API does. It only register the interrupt number and the Handler function for that. Or something other is also required here.

    Because in OSAL layer I find two files "RegisterIntr_tirtos.c" and "HwiP_tirtos.c".

    Please let me know why HwiP is different.

  • Hi,

    The Operating System Abstraction Layer (OSAL) provides an API to an abstract operating system. The intent to to enable faster development of applications for multiple software and hardware platforms since the same API can be used with these software and hardware platforms. The reason there are two files is because OSAL currently provides support for TI-RTOS and bare-metal (i.e. no OS).

    Additional details are provided here: 

    Regards,
    Frank

  • Hi Frank,

    Thanks for the reply,

    We have found the solution and the way to integrate the interrupt handling mechanism of OSAL with Quadros.

    I am closing this issue.