PRU0 to PRU1 interrupt

97 views
Skip to first unread message

Paul Beam

unread,
Jan 9, 2020, 12:54:54 PM1/9/20
to BeagleBoard
I'm having trouble getting PRU1 to recognize an event generated by PRU0.  The examples I have found appear to be contradictory, so I hope someone can give me some help.  I am using RemoteProc in a recent TI kernel on a PocketBeagle, and I can load and execute firmware just fine.  PRU1 uses RPMSG, and I can generate and acknowledge events generated by the ARM to PRU1.  I try to generate events on PRU0, directed to PRU1, and PRU1 is oblivious.

First of all, I have seen somewhere that PRU0-PRU1 is event 21, but I don't understand where this is defined.  On PRU0, my understanding is that I write to r31 with bit 5 set and the event in the lower 4 bits, so "ldi r31, 21+32" is what I am using on PRU0.

On PRU1, I want to map this event to host interrupt 0, so I can test bit 30 of R31 to see if the interrupt has occurred.  In my resource table:
/* Mapping sysevts to a channel. Each pair contains a sysevt, channel. */
struct ch_map pru_intc_map[] = { {18, 3},
                                 {19, 1},
                                 {21, 0}
};
and
/* Channel-to-host mapping, 255 for unused */
0, 1, HOST_UNUSED, 3,  HOST_UNUSED,
HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED,

Is this right?  I have found one project where generating the interrupt involved subtracting 16 from the event written to R31.

Paul Beam

unread,
Jan 9, 2020, 1:28:52 PM1/9/20
to BeagleBoard
Well, as often happens, a moment after I verbalize my problem I find the solution!  It appears that subtracting 16 is correct, but my scope probe was not.  Once I started probing the proper pin I was seeing PRU1 see events generated from PRU0.
Reply all
Reply to author
Forward
0 new messages