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.

SWI priorities between CCS 3.1 and CCS 5.2.1



I'm trying to understand the difference between how SWI priorities are defined in CCS 3.1 and CCS 5.2.1.

In CCS 3.1 there is a .cdb file with two properties: param pri and param order that seem to relate to SWI priority.

In CCS 5.2.1 there is a .tcf file with one property, priority, that seems associated with a SWI priority. (There is no "order" property).


What is the difference in these two cases?

I'm trying to manually ensure the SWI priorities from the 5.2.1 project are the same as the 3.1 project but I'm not sure which fields to compare.

Are there any reference documents you can recommend?

  • Hi Robert,

    What version of DSP/BIOS are you using in CCSv3.1? I assume version 4.x since you mentioned *.cdb files.

    In your CCSv5.2.1 installation, I assume you are using BIOS 5.4.x (CCSv5 doesn't support BIOS 4.x). What is the exact version?

    Thanks
    ki
  • Ki,

    For CCSv3.1 we are using DSP/BIOS 4.90.280.

    For CCSv5.2.1 we are using DSP/BIOS 5.41.13.42.

    Thanks.

    Robert

  • Thanks. I'll move your post into the TI-RTOS forum where the experts there can help you best.

    ki
  • Robert,

    The GUI's SWI property view doesn't show the "order" parameter. However, after creating a SWI, the generated TCF file includes a line for the SWI's order assignment:

    bios.SWI.create("SWI0");
    bios.SWI.instance("SWI0").order = 1;
    bios.SWI.instance("SWI0").fxn = prog.extern("MyFunc");

    I'm guessing that if your 4.90 bios application required a specific order for statically defined, like-prioritied SWI's to be placed in the corresponding priority ready queue, then you can manually set the order fields by editing the .tcf file directly.

    Keep in mind that the 'order' field only effects how statically defined, READY-TO-RUN SWIs are placed in their corresponding ready queues.

    At runtime, the SWI_post() API does NOT honor the 'order' setting at all. SWI_post() places the SWI in its ready queue in the order it is posted: first-posted, first-run.

    Alan
  • Alan,
    Thanks for your reply. I'm not sure what you mean by:
    " 'order' field only effects how statically defined, READY-TO-RUN SWIs are placed in their corresponding ready queues. "

    For example, my tcf file has the following PRD (one example of several):

    bios.PRD_200ms = bios.PRD.create("PRD_200ms");
    bios.PRD_200ms.comment = "200ms SWI";
    bios.PRD_200ms.period = 0x28;
    bios.PRD_200ms.fxn = prog.extern("SWI_post");
    bios.PRD_200ms.arg0 = prog.extern("SWI_200ms");
    bios.PRD_200ms.order = 0x2;

    and the following corresponding SWI:

    bios.SWI_200ms = bios.SWI.create("SWI_200ms");
    bios.SWI_200ms.priority = 3;

    In general, we set the SWI priority according to how fast it runs. Faster SWIs get higher priority. But I'm not sure how the order affects this:
    bios.PRD_200ms.order = 0x2;

    Can you tell if the PRD order field matters in this case?

    And, more generally what is the function of the PRD order field?


    Thanks.

  • I'm still checking with experts on this. Everyone's a little sketchy but it appears that the "order" field of a statically created PRD object determines the order in which all PRD objects with the SAME period are processed.
  • Ok, thanks for checking.
  • Hi Alan,
    Any update on the function of the "order" field?
  • I confirmed that the order attribute of the PRD objects is exactly as I described. You can change the order graphically by drag-and-dropping the objects into the order you'd like them to be executed (for those PRD objects sharing the same period).

    The order attribute of the SWI objects is an unintentional and meaningless artifact of the gconf GUI tool. Please ignore the SWI object's order attribute.

    Alan