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 send interrupt from external device to A15_0 by using sys_nirq1 or sys_nirq2 pin

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.

http://e2e.ti.com/support/processors/f/791/p/772265/2864234#2864234

 

They also want to know how to send interrupt from external device to A15_0 by using sys_nirq1 or sys_nirq2 pin.

 

Question:

1: Are there any sample code of sending interrupt from external device to A15_0 by using sys_nirq1 or sys_nirq2 pin?

2: Can we use GPIO_setCallback() or GPIO_enableInt() to use sys_nirq1 or sys_nirq2 pin?

3: Could you tell us the recommended way of configuring IRQ_CROSSBAR?

 

We would appreciate if you tell us the recommended way of sending interrupt from external device to A15_0 by using sys_nirq1 or sys_nirq2 pin.

 

Best regards,

  • Hi matusan,

    #1 I made a search in the AM57x RTOS code, but not able to find such example

    #2 No, GPIO APIs can be used only for GPIO module. sys_nirq is not related to GPIO module

    #3 sys_nirq1 is mapped by default to MPU_IRQ_7, register CTRL_CORE_MPU_IRQ_4_7[24:16] = 0x2 (default value). Check what value you have in CTRL_CORE_MPU_IRQ_4_7[24:16], if 0x2, then no need to configure IRQ_CROSSBAR, you can use MPU_IRQ_7 for sys_nirq1. The same is valid for sys_nirq2 and MPU_IRQ_119.

    Regards,
    Pavel
  • Hi,

     

    Thank you very much for your kindness.

    I really appreciate your help.

     

    Our customer sent us additional questions.

    They understand GPIO APIs such as GPIO_setCallback(),GPIO_enableInt() can not be used sys_nirq.

    And 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?

     

    Let me know if anything is missing.

     

    Best regards,

  • Matusan,

    Regarding PDK package, the correct irq number for sys_nirq1 is 2 , this is "IRQ_CROSSBAR Instance Number" from AM572x TRM Table 17-2. MPU_INTC Default Interrupt Mapping.

    Check below pdk file:

    pdk_am57xx_1_0_13/packages/ti/csl/soc/am572x/src/csl_device_xbar.h

    CSL_XBAR_EXT_SYS_IRQ_1 = 2,

    CSL_XBAR_GPIO1_IRQ_1 = 24,
    CSL_XBAR_GPIO2_IRQ_1 =25,


    These irq numbers (for example GPIO) are used with CSL_xbarIrqConfigure() function in below files:

    pdk_am57xx_1_0_13/packages/ti/csl/example/gpio/gpio_interrupt/main.c
    pdk_am57xx_1_0_13/packages/ti/drv/gpio/test/led_blink/src/am572x/GPIO_idkAM572x_board.c

    CSL_xbarIrqConfigure() is used to enable GPIO irq in Cortex-A15 MPU, while GPIO_enableInt() is used to enable GPIO irq at GPIO module level (GPIO_IRQSTATUS_SET register).

    For sys_nirq1, you need to configure irq only in Cortex-A15 MPU, thus you can explore CSL_xbarIrqConfigure() function.

    Regarding Hwi_create() function, I am not familiar, as it is located in the BIOS package, not PDK. I would suggest you to open new e2e thread regarding Hwi_create() usage.



    Regards,
    Pavel
  • Hi,

     

    Thank you very much for your kindness.

    I really appreciate your help.

     

    Our customer want to know "Hwi_create() usage".

    So we'd like to open new e2e thread.

     

    Best regards,