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.

Interrupt from PRU1 to ARM linux kernel module

Part Number: AM3358

I have a problem sending an interrupt from PRU to linux kernel module
on a am335. I tried on beaglebone with TI debian and bullseye images.
Any help would be appreciated as i'm stuck...

Context: A fairly common and simple scenario of writing a double buffer
to PRU memory from kernel module and read it with PRU1. PRU sends an
interrupt when it starts reading a buffer.

What i have done:
- I use IEP for timing purposes in PRU. Interrupt mapping and catching works.
- Instead mapping to host 6/7 to interrupt arm i temporarily mapped to
host 0/1 to check correctness. I can catch it with the other PRU.
- I can write PRU memory from user space and kernel module (both
verified with scope on io pins written with pru)
- irq_request in kernel module returns 0. Kernel module shows up in
/proc/interrupts

Literally everthing works except the interrupt signal from PRU to ARM.

The commented sections where tryouts. The unspecific FFFF settings are
also tryouts. I also tried only setting specific bits.
I also tried other events/channels/interrupts...

ko

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
result = request_irq(24,
pru_output0_irq_handler,
IRQF_TRIGGER_RISING,
"testirq",
NULL);
result = request_irq(25,
pru_output1_irq_handler,
IRQF_TRIGGER_RISING,
"testirq",
NULL);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


pru1

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CT_INTC.SIPR0 = 0xFFFFFFFF;
CT_INTC.SIPR1 = 0xFFFFFFFF;
CT_INTC.SITR0 = 0;
CT_INTC.SITR1 = 0;
CT_INTC.SECR0 = 0xFFFFFFFF;
CT_INTC.SECR1 = 0xFFFFFFFF;
CT_INTC.ESR0 = 0xFFFFFFFF;
CT_INTC.ESR1 = 0xFFFFFFFF;
CT_INTC.CMR1_bit.CH_MAP_7 = 1;
CT_INTC.CMR4_bit.CH_MAP_16 = 6;
CT_INTC.CMR4_bit.CH_MAP_17 = 7;
CT_INTC.HMR0_bit.HINT_MAP_1 = 1;
CT_INTC.HMR1_bit.HINT_MAP_6 = 6;
CT_INTC.HMR1_bit.HINT_MAP_7 = 7;
//CT_INTC.SICR = 16;
//CT_INTC.SICR = 17;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks