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: How to use sys_nirq1 by Hwi_create() in sysbios

Guru 10235 points
Part Number: AM5728

Tool/software: TI-RTOS

Hello, TI Experts,

 

Our customer sent us additional questions about from the below E2E thread.

https://e2e.ti.com/support/processors/f/791/p/777871/2882255#2882255

 

They would like to know how to use sys_nirq1 by Hwi_create().

 

Question:

Their understanding is like below;

   - "sys_nirq1" can be configured by Hwi_create() like below.

       - Hwi_create(Int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *params, Error_Block *eb)

   - "intNum" should be set "39" from MPU_IRQ_7 (ID39) GIC ID Number in "Table 17-2. MPU_INTC Default Interrupt Mapping" of TRM.

 

Is this understanding correct?

 

We would appreciate if you tell us how to use sys_nirq1 by Hwi_create().

 

Best regards,

  • Hi,

    We found the related E2E-thread like below;
    e2e.ti.com/.../1335818

    We understand like below from this E2E-thread.
    - We found some success case of "UART1_IRQ" like below for DRA75x which seems to be same kind device of AM5728.
    hwhandle = Hwi_create(104, (Hwi_FuncPtr)ptr, &hwiParams, &eb);
    - It seems to be success by using intNum=104 of Hwi_create().
    - GIC ID Number of UART1_IRQ is also "104" in the below DRA75x TRM "Table 17-2. MPU_INTC Default Interrupt Mapping".
    www.ti.com/.../sprui30f.pdf
    - We also found GIC ID Number of UART1_IRQ is "104" in the below AM5728 TRM "Table 17-2. MPU_INTC Default Interrupt Mapping"
    www.ti.com/.../spruhz6k.pdf

    So, intNum of Hwi_create() should be set with GIC ID Number in "Table 17-2. MPU_INTC Default Interrupt Mapping" of TRM.
    (We can use Hwi_create() by setting GIC ID Number in TRM to intNum.)

    Question:
    Is this understanding correct?

    Best regards,
  • Matusan,

    Yes that is the correct understanding based on description above is correct.

    Instead of using HWI_create, you can also use the OSAL layer(OS Abstraction layer) to setup the interrupt configuration similar to drivers and CSL code for DCAN loopback.

    Refer to the DCANAppConfigIntr function in the file (pdk_am65xx_1_0_3\packages\ti\csl\example\dcan\dcanLoopback\rtos\dcan_loopback_rtos_main.c)to see how crossbar and interrupt configuration can be done using OSAL.

    Regards,
    Rahul
  • Hi,

    Thank you very much for your kindness.

    I really appreciate your help.

    I will send the answer to the customer.

    Best regards,