Zynq Interrupts
Chris Johns
chrisj at rtems.org
Wed Aug 10 22:11:53 UTC 2016
On 11/08/2016 00:41, Badr El Hiouel wrote:
>
> In my RTEMS app, I want to connect a function which is called when a
> hardware interrupt occurs. I looked for that in the RTEMS's cpukit and I
> found the function rtems_interrupt_handler_install. I used it like this
>
> rtems_status_code installstatus = rtems_interrupt_handler_install(31,
> "PL_IRQ",RTEMS_INTERRUPT_UNIQUE,(rtems_interrupt_handler) my_handler,
> NULL) { };
>
> The handler I created for this is (it basically clears the interrupt) :
>
> rtems_isr my_handler(void *arg)
> {
> volatile unsigned long c= 0;
> BASE_IRQ = c;
> printf("interrupt cleared \n");
This needs to be 'printk' when inside an interrupt. Do not use printf.
> return;
> }
>
> Please tell me if this function and the handler can be used like I did ?
The rtems_interrupt_handler_install call correct and the API to use for
the Zync.
> And what is the difference with rtems_interrupt_catch function ? It's a
> little bit confusing.
There is more than one interface to interrupts.
Chris
More information about the users
mailing list