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/AM5728: sys_nirqx function for SMP

Guru 10235 points
Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hello, TI Experts,

 

Our customer sent us additional questions about sys_nirqx function of AM5728 from the below E2E thread.

https://e2e.ti.com/support/processors/f/791/p/779630/2885183#2885183

 

They can create their program to use sys_nirq1 and sys_nirq2 on A15_0 like below statements.

Thank you !

>hndHwiIrq1 = Hwi_create(39, intProcIrq1, NULL, NULL);

>hndHwiIrq2 = Hwi_create(151, intProcIrq2, NULL, NULL);

 

 

They tied to improve their program by using SMP function with A15_0 & A15_1.

And they said they can also success to run sys_nirq1 and sys_nirq2 function

with only *.cfg fie modification like below;

- BIOS.smpEnabled = true;

 

Question:

- Are thee any problem by using NULL parameter like below?

  >hndHwiIrq1 = Hwi_create(39, intProcIrq1, NULL, NULL);

  >hndHwiIrq2 = Hwi_create(151, intProcIrq2, NULL, NULL);

- Are there any additional code modification by using sys_nirq1 and sys_nirq2 function with SMP?

- Could you tell us the recommended way or sample code by using sys_nirq1 and sys_nirq2 function with SMP?

Best regards,

  • matusan said:

    >hndHwiIrq1 = Hwi_create(39, intProcIrq1, NULL, NULL);

      >hndHwiIrq2 = Hwi_create(151, intProcIrq2, NULL, NULL);

    NULL, NULL arguments are used when the default instance parameters and generic error handling is satisfactory for creating a Hwi object. I don`t see any reason that this would impact SMP or AMP mode operation.

    matusan said:

    - Are there any additional code modification by using sys_nirq1 and sys_nirq2 function with SMP?

    - Could you tell us the recommended way or sample code by using sys_nirq1 and sys_nirq2 function with SMP?

    I don`t think there is example code for using sys_nirq1 in the AM57xx RTOS SDK

    Just curious, since the HWI code is working with sys_nirq1, is there a reason that the customer needs more guidance. Is there any concern primarily to to use the same code with SMP?

    Regards,

    Rahul

  • Hi,

    Thank you very much for your kindness.

    I really appreciate your help.

    We understand proper example code for their use-case seems not to be exist.

     

    They sent us the detail which they would like to know like below;

    1: Are there any notice "NULL" parameter for their SMP use-case of Hwi_create?

    2: Is it OK to still use "ti.sysbios.hal.Hwi" for SMP?

    3: Is default affinity is Affinity=0 for those sys_nirq1 and sys_nirq2?

    4: Are there any restriction for SMP about sys_nirq1 and sys_nirq2.

     

    And current our understanding

    1: Any problem seems not to be found for their NULL parameter usage for SMP.

    2: It is OK to still use "ti.sysbios.hal.Hwi" for SMP.

    3: Default affinity for those sys_nirq1 and sys_nirq2 is Affinity=0 from below link description.

         http://processors.wiki.ti.com/index.php/SMP/BIOS#Getting_started

         "All interrupts run on Core 0 by default."

    4: There is any remarkable notice/restriction for SMP about sys_nirq1 and sys_nirq2.

     

    If there are any comments, please tell us.

     

    Best regards,

  • Hi,

     

    Thank you very much for your kindness.

    I really appreciate your help.

     

    >Is there any concern primarily to to use the same code with SMP?

     

    Our customer is waiting for the answer to their concern to use the same code with SMP like below.

      1: Are there any notice "NULL" parameter for their SMP use-case of Hwi_create?

      2: Is it OK to still use "ti.sysbios.hal.Hwi" for SMP?

      3: Is default affinity is Affinity=0 for those sys_nirq1 and sys_nirq2?

      4: Are there any restriction for SMP about sys_nirq1 and sys_nirq2?

     

    And we also posted our understanding like below.

      1: Any problem seems not to be found for their NULL parameter usage for SMP.

      2: It is OK to still use "ti.sysbios.hal.Hwi" for SMP.

      3: Default affinity for those sys_nirq1 and sys_nirq2 is Affinity=0 from below link description.

         http://processors.wiki.ti.com/index.php/SMP/BIOS#Getting_started

         "All interrupts run on Core 0 by default."

      4: There is not any remarkable notice/restriction for SMP about sys_nirq1 and sys_nirq2.

     (Sorry, I added "not" because of typo.) 

    Question:

       Are those understanding correct?

     

    Best regards,