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.

ECAP not interrupting with new SDK

Hello again,

As in http://e2e.ti.com/support/arm/sitara_arm/f/791/t/312681.aspx, I am totally stuck. I can happily report that my module works correctly on EZSDK 6 (using Linux kernel 3.2), but I tried it today on 

Linux am335x-evm 3.12.10-ti2013.12.01 #1 Mon Mar 24 09:25:56 CDT 2014 armv7l GNU/Linux

and it exhibits exactly the behavior in my prior thread.

I can strobe the ECAP pin and watch captures register in the module (and read values out of the registers, and watch ECFLG change appropriately), but the interrupt routine is never called, and no interrupts are recorded in /proc/interrupts.

My kernel interrupt request in the probe routine returns zero. Using a kernel that supports device trees is basically required, so I'm pretty keen to get this figured out.

Does anyone know where I can start looking?

  • Hi Brandon,

    You can check whether the interrupt gets enabled in eCAP init.

  • Can you elaborate any more? The included ti-epwmss driver doesn't use interrupts at all, if that's what you mean. In my code, I'm enabling the interrupts in ECEINT. More suggestively, the exact same code works when compiled against linux-3.2.0-psp04.06.00.11.

    Unfortunately, I don't understand the interrupt controller, nor do I find the documentation illuminating. :(

  • root@am335x-evm:~# ./force_int
    PWMSS register values = {
            IDVER:          0x47400001
            SYSCONFIG:      0x00000008
            CLKCONFIG:      0x00000111
            CLKSTATUS:      0x00000111
    }
    ECAP0 register values ={
            TSCTR:  0x34be8306      CTRPHS: 0x00000000
            CAP1:   0x00000000      CAP2:   0x00000000      CAP3:   0x00000000      CAP4:   0x00000000
            ECCTL1: 0x01aa  ECCTL2: 0x0096  ECEINT: 0x003e
            ECFLG:  0x0000  ECCLR:  0x0000  ECFRC:  0x0000
            REVID:  0x44d22100
    }
    
     test done.
    root@am335x-evm:~# ./setup_pins.sh ; ./strobe_pins.sh ; ./force_int
    PWMSS register values = {
            IDVER:          0x47400001
            SYSCONFIG:      0x00000008
            CLKCONFIG:      0x00000111
            CLKSTATUS:      0x00000111
    }
    ECAP0 register values ={
            TSCTR:  0x000d46e3      CTRPHS: 0x00000000
            CAP1:   0x00000000      CAP2:   0x99379f29      CAP3:   0x00000000      CAP4:   0x00000000
            ECCTL1: 0x01aa  ECCTL2: 0x0096  ECEINT: 0x003e
            ECFLG:  0x0005  ECCLR:  0x0000  ECFRC:  0x0000
            REVID:  0x44d22100
    }
    
     test done.
    root@am335x-evm:~#

    I've attached an example of the relevant registers, and an example workflow. The setup_pins.sh and strobe_pins.sh scripts simply use GPIO to quickly strobe the ecap pin.

    As you can see, after strobing the pin, ECFLG changes, and a capture is stored in CAP2, but no interrupt occurs (no output in dmesg as expected, and INT 31 reads zero in /proc/interrupts).