Assigning Interrupt Handlers

Giulio Moro g.moro at
Sat Sep 5 22:54:03 CEST 2020

Hi Fred,
See here for an example of a rtdm driver that receives interrupts from the PRU:   with ioctl you can set up the interrupts and route them through the interrupt channels and export them to the ARM interrupt controller. The PRU interrupt controller is fairly confusing to me so I tried to reference the am335x TRM in the comments where appropriate.
From: Xenomai <xenomai-bounces at> on behalf of Frey, Fred (ext ???) via Xenomai <xenomai at>
Sent: Friday, September 4, 2020 10:49:23 PM
To: xenomai at <xenomai at>
Subject: Assigning Interrupt Handlers

Hello all,

I'd like some guidance on the topic of setting up interrupt handlers to work with Xenomai.

Platform: Debian Buster on AM335x Arm (Beaglebone Black)
Xenomai version: 3.0.10
`uname -r` : 4.14.108-ti-xenomai-r135

Specifically, I'd like to set up a function to run every time the PRU generates an interrupt that I've defined.
I'm a little confused on what functionality is actually provided here. Reading the docs I easily can find the 'rtdm_irq_request()' function which looks like exactly what I need.
However, when looking through the header files I have, I can't find any mention of this function. Looking through some old mailing list posts, I gathered that this function was
actually only callable from the kernel context. So I guess my question is three-fold:

  1.  Is it possible for me to register an interrupt handler from userspace?
  2.  If not, is the prescribed method of doing this to write a device driver?
  3.  If I have to write a device driver for the PRU, would my  interrupt handler have to live inside of my device driver, or would I be able to register

a function inside of my client program to be an interrupt handler?

Thanks  in advance,

More information about the Xenomai mailing list