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.

AM3358: The INTC interrupt is not getting triggered in AM3358

Part Number: AM3358
Other Parts Discussed in Thread: SYSCONFIG

Hi All,

The INTC interrupt in AM3358 is not getting triggered.

The interrupt related to the LCD controller is occuring, however the INTC interrupt does not occur.

Reading the following registers on a polling basis shows

"Read INTC_ITR1 configuration: 00000010"

"Read IRQSTATUS configuration: 00000001"

This means that the LCD interrupt is occuring but the INTC interrupt is not happening.

The interrupt was successfully registered but while reading cat /proc/interrupts, there is Zero occurrence shown.

In the device tree the interrupt was included,

I kindly request you to help me on this.

Regards

Anu

  • Hello Anand,

    Please note that the subject owner may be on winter holiday.

    * This is on a custom board, right?
    * What version of software are you running?
    * Please show the part of your device tree with the LCD and the interrupt getting included.

    Regards,

    Nick

  • Hi Nick,

    Thank you for response.

    I am still not able to resolve why the INTC  is not getting triggered.

    The software version is on a Debian Linux and this is on a BBB.

    Please have the details below: (Please note that the LCD is working fine and the display is appearing)

    //**************************************************************************In Device tree, the lines where we have enabled the interrupts are as below***************************************************//

    fragment@1 {
                    target = <&ocp>;
                    __overlay__ {
                    #address-cells = <1>;
                    #size-cells = <1>;
                    /*ranges = <0x4830e000 0x1000>;*/
                            lidd_regs: lidd_regs@4830e000 {
                                    compatible = "bone-pinmux-helper";
                                    pinctrl-names = "default";
                                    pinctrl-0 = <&bb_lidd_lcd_pins>;
                                    reg = <0x4830e000 0x1000>;
                                    interrupt-parent = <&intc>;
                                    interrupts = <36>;
                                    ti,hwmods = "lcdc";
                                    status = "okay";
                            };
                    };
    };

    //**************************************************************************Below are the lines from /proc/interrupts***************************************************//

    Driver# cat /proc/interrupts


               CPU0
     16:     178060      INTC  68 Level     gp_timer
     18:          0      INTC   3 Level     arm-pmu
     20:          1      INTC  78 Level     wkup_m3_txev
     21:       5035      INTC  12 Level     49000000.edma_ccint
     23:         41      INTC  14 Level     49000000.edma_ccerrint
     27:          0      INTC  96 Level     44e07000.gpio
     28:          0      INTC  98 Level     4804c000.gpio
     29:          0      INTC  32 Level     481ac000.gpio
     30:          0      INTC  62 Level     481ae000.gpio
     31:         12      INTC  72 Level     44e09000.serial
     36:          0      INTC  46 Level     anufb
     37:       1451      INTC  70 Level     44e0b000.i2c
     38:          0      INTC  71 Level     4802a000.i2c
     39:          0      INTC  30 Level     4819c000.i2c
     40:      14279      INTC  64 Level     mmc0
     41:        908      INTC  28 Level     mmc1
     45:          0      INTC  77 Level     wkup_m3
     51:          0      INTC  75 Level     rtc0
     52:          0      INTC  76 Level     rtc0
     56:          0      INTC  41 Level     4a100000.ethernet
     57:          0      INTC  42 Level     4a100000.ethernet

    //****************************************************************************************************************************************************************//

    Even though the display works right, the INTC interrupt never gets called. I saw similar issues related to INTC interrupt not appearing.

    I even tried to check if the issue was something related to INTC controller. So i enabled all the clocks and was able to write and read to INTC registers, as shown below.

    //**************************************************************************Below are the lines from writing and reading to registers of the interrupt controller***************************************************//

                    Read INTC_PROTECTION configuration: 00000001
    [ 1586.211136]
                    Read INTC_PROTECTION configuration:   (null)
    [ 1586.211142]
                    Read INTC_SYSCONFIG configuration: 00000001
    [ 1586.211148]
                    Read INTC_IDLE configuration:   (null)
    [ 1586.211153]
                    Read INTC_IDLE configuration:   (null)
    [ 1586.211159]
                    Read (INTC_ILR_0 + 36) configuration:   (null)
    [ 1586.211165]
                    Read (INTC_ILR_0 + 36) configuration:   (null)
    [ 1586.211171]
                    Read INTC_MIR1 configuration: bffff9fe
    [ 1586.211176]
                    Read INTC_MIR1 configuration: bffff9ee
    [ 1586.211182]
                    Read INTC_CONTROL configuration:   (null)
    [ 1586.211188]
                    Read INTC_CONTROL configuration:   (null)
    //****************************************************************************************************************************************************************//

    But even after all this I never see the INTC getting called or triggered in /proc/interrupts.

    So can you please share some thoughts/ suggestions on this.

    Regards

    Anand

  • Hello Anand,

    Please note that we do not support Debian on these forums, so the assistance we can offer will be limited. I am reassigning this to our display owner to take a look.

    Regards,

    Nick

  • Hello Anand,

    Please correct me if I am wrong but based on your observation the DONE bit in the LIDD_CTRL register is set and an interrupt on the CPU side is not generated.

    Regards,
    Krunal

  • Hi Krunal,

    You are right. When I do a polling on the LIDD_CTRL, the DONE bit gets set. This happens correctly.

    But in the driver I need to call a interrupt handler and the LCDC_INT number is 36.

    I registered a interrupt request successfully during the initialization of the driver.  But even though the DONE bit gets set based on LCD events, I never see the LCDC_INT (36) getting incremented in the /proc/interrupts. And because of this interrupt handler function never gets called.

    Regards

    Anand

  • Hi Anand,

    Unfortunately, we do not test Debian and I would recommend you to check with Debian community if there are any bugs associated with the interrupt driver. 

    Regards,
    Krunal

  • Hi Krunal,

    Thank you. I will try to get answers from other communities.

    But could you please clarify one doubt.

    In /proc/interrupts (a copy provided below), what does the number in fourth column represent, ie 46?.

    Query 1:

    The LCD INTC interrupt number is 36 as per the TRM of AM3358.

    So in the device tree should I put 36 or 46 as INTC?.

    Query 2:

    And also, when I do a interrupt request, should I put 36 or 46?. like in the statement below

    "ret = request_irq(36, lcd_irq_handler, IRQF_TRIGGER_HIGH, CH_DEVICE_NAME, NULL);"

    The value of ret is 0root@beaglebone:/home/SD_Card_LCD/LCD/userspace# cat /proc/interrupts
               CPU0
     16:      61285      INTC  68 Level     gp_timer
     18:          0      INTC   3 Level     arm-pmu
     20:          1      INTC  78 Level     wkup_m3_txev
     21:       5870      INTC  12 Level     49000000.edma_ccint
     23:         67      INTC  14 Level     49000000.edma_ccerrint
     27:          0      INTC  96 Level     44e07000.gpio
     28:          0      INTC  98 Level     4804c000.gpio
     29:          0      INTC  32 Level     481ac000.gpio
     30:          0      INTC  62 Level     481ae000.gpio
     31:         12      INTC  72 Level     44e09000.serial
     36:          0      INTC  46 Level     anufb
     37:       1451      INTC  70 Level     44e0b000.i2c
     38:          0      INTC  71 Level     4802a000.i2c
     39:          0      INTC  30 Level     4819c000.i2c

    Regards

    Anand

  • Hello Anand,

    The number in the fourth column represent the HW IRQ and it is defined in the DTS+TRM. For example, in the am33xx.dtsi file, the SGX interrupt number is set to 37 and that matches the int number present in Table 6-1.

    Regards,
    Krunal