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.

AM623: Bind GPIO ISR to different core

Genius 13655 points

Part Number: AM623
Other Parts Discussed in Thread: SK-AM62B

Hello Champs,

SDK Version: Ti-processor-sdk-linux-rt-am62xx-evm-09.00.00.03-Linux-x86-Install

Customer registered GPIO interrupts in the kernel. The relevant user code is executed in the GPIO interrupt.

Because of the frequent triggers of interrupts, the interrupt and the tasks need to be assigned to other cores.

The default is assigned to CPU0.

Currently trying to switch, but it doesn't work. 

In addition, the kernel driver code uses the irq_set_affinity related function to assign the interrupt to the specified core. And it failed.

The irq_set_affinity function returns a failure and fails to assign the interrupt to the specified CPU core.

Are there some code for reference which can assign the interrupt to the specified CPU?

Thanks
Regards
Shine

  • Hi Shine,

    Please try the following command instead.

    /proc/irq/384 # echo "2" > smp_affinity_list

  • HI,

    We try all the file in /proc/irq/384/, no file can write. 

    sh: write error: Input/output error

    Irq-384 is the interrupt of gpio1_9.

    And we check some gpios interrupt, same problem.

    as:

    echo #num > /sys/class/gpio/export

    echo in > direction

    echo both > edge

    then  cd /proc/irq/#xxxx ,new gpio irq dir.

    echo "2" > smp_affinity or echo "2" > smp_affinity_list.

    /proc/irq/384 # echo 2 > smp_affinity
    sh: write error: Input/output error
    /proc/irq/384 # echo 2 > smp_affinity_list
    sh: write error: Input/output error
    /proc/irq/384 #

    All the gpios interrupts can't set.

    interrupts: i2c,serial,spi,ethernet. can set by command "echo 2 > smp_affinity"

    We check the devicetree,

    the irqtype of GPIO is GIC_PPI

    other device:spi,i2c,serial. the irqtype is GIC_SPI.

    We try to change the irqtype of GPIO to GPI_SPI, but fail.

  • Hi Jie,

    Please try the following command instead.

    /proc/irq/384 # echo "2" > smp_affinity_list

    I am sorry for the incorrect instruction. A few months ago, I used irq affinity using 'smp_affinity_list' entry, but I just reviewed that thread now, it was on DMA irq, not GPIO irq.

    All the gpios interrupts can't set.

    I tried to set GPIO irq affinity on SK-AM62B board, but it fails the same as your test. Apparently GPIO irq doesn't support irq affinity.