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.

IDriver question on setting up a driver...

I am trying to port a UART driver from PSP to run on an the ARM of the OMAP0L138 using Sys/BIOS...

What I am finding out is that it loos like the PSP code was designed for the DSP, so I moded the code for the ARM.

Next I found out that there is some interfaces that are suported on the BIOS for the DSP that are not present on the SYS/BIOS, so I moded that.

Now I am trying to get the driver into an IDriver version form the IOM version that it was.

I am not running into an issue where the IDriver seems to have some documentation wholes and the examples dont seem to be very practicle.

Also I could not get the xs utility to run to generate the template.

What I am missing is how to get the Function Handles Open/Submit/Close etc.  registered into the Driver Table.

I am guessing I am going to make a table with the pointers to the functions and then some how include a pointer to the table when I call the DriverTable_add function?

But I am missing the what to use part.

Thanks,

Mike Geppert

IPC: 1.24.0.16

SYS/BIOS: 6.33.0.19

PSP: 1.03.01  (I only snagged the UART/CSLR code out of this and made it a project inside CCS)

XDC 3.23.0.32

CCS: 5.1.0.09000

 

  • I am gathering by the complete lack of answers that IDriver is kind of mythical? 

  • Hi Mike,

    Have you looked in the IPC User Guide. There is a discussion of IDriver, DriverTable and Stream modules there. There is an example in the ti/sdo/io/examples directory. It show how to add a driver and use Stream to create input and output channels. Then use Stream_issue/reclaim to send and receive.

    Todd

  • I have looked at the examples.

    The issues I am having is how to register the open, delete, control, etc. functions into the IDriver.  I saw that the IOM stuff used the config files and also passed in some init functions.  All of that is really missing a lot of documentation it seems like.

    When I tried my port it crashed very badly.

    So I have started down the IOM path on the DSP.  I need to port it to the ARM side and then would like to get it to the IDriver because we would like to use the Generator and Translators features.

    Thanks

     

     

  • Mike,

    Use the DriverTable module to register your IDriver. In the stream example in Ipc, the following lines add a Generator driver instance into the DriverTable.

    var Generator = xdc.useModule('ti.sdo.io.drivers.Generator');
    var DriverTable = xdc.useModule('ti.sdo.io.DriverTable');
    var genDevice = Generator.create();
    DriverTable.addMeta("/genDevice", genDevice);

    You can do this during runtime also via the DriverTable_add() API.

    When the Stream is created (example code below) the IDriver's open call is called.

        Stream_Params streamParams;

        Stream_Params_init(&streamParams);
        streamParams.chanParams = (UArg)&genParamsIn;
        handleIn = Stream_create("/genDevice", Stream_INPUT, &streamParams, NULL); // IDRiver open is called

    Similarity the IDriver close is called in the Stream_delete, IDriver issue/reclaim are called in Stream_issue/reclaim and IDriver control is called Stream_control (and Stream_abort).

    Todd