PRU1 to ARM interrupt

Hi!

I would like to notify my host program that PRU1 has reached the end of its execution.

On PRU1, I have:

MOV R31.b0, PRU1_ARM_INTERRUPT+16

where PRU1_ARM_INTERRUPT = 20.

On host side, I have (using python binding):

`
prussdrv.init()
prussdrv.open(prussdrv.PRU_EVTOUT_1)

prussdrv.pru_wait_event(prussdrv.PRU_EVTOUT_1)
prussdrv.pru_clear_event(prussdrv.PRU_EVTOUT_1, prussdrv.PRU1_ARM_INTERRUPT)
`

but it does not work; my host never comes out from pru_wait_event()…

I have to admit that I don’t understand yet very well how interrupts work!

Thanks,

Frédéric

I believe you might be missing a

prussdrv.pruintc_init()`

`

after your prussdrv.open() call. This initializes the PRU interrupt controller and determine what EVENT_1 etc. will be.

I'll try that. Thanks !

ur lucky day, just did it :slight_smile:

Thanks! There are a lot of things I still need to understand (mainly about
default interrupt mapping), But your example helps!

Thanks,