Interrupt server on BBB

Federico Garcia Cruz federico.garciacruz at tallertechnologies.com
Tue Jul 14 13:04:35 UTC 2015


The problem in the beaglebone bsp interrupt server resides in the way
bsp_interrupt_dispatch handles the interrupts.
bsp_interrupt_dispatch disables the interrupt vector, dispatches the
handler for the vector and then it enables the interrupt vector. Meanwhile,
the irq server disables the interrupt vector, sends an event in order to
"wake up" the server task and only after the server task calls the
installed handler for the vector it enables the interrupt vector again.
Interrupts that are not handle by bsp_interrupt_dispatch would signal an
interrupt again and again and the server task would be never executed.
I have tried some patch in irq and irq server that signalizes when an
interrupt vector should not be enabled by bsp_interrupt_dispatch and is
working fine but I am not sure what is the correct way of handling the
enabling/disabling ot the interrupts.

2015-07-13 20:36 GMT-03:00 Angelo Fraietta <
newsgroups at smartcontroller.com.au>:

> It may be off track but try increasing your stack size for the tasks.
> What you can also try is instead of doing a printk, try blinking one of
> the Leds on an interrupt - just removes the printk from equation.
>
> On Mon, Jul 13, 2015 at 10:49 PM, Martin Galvan <
> martin.galvan at tallertechnologies.com> wrote:
>
>> Hi everyone! I'm currently trying to use an interrupt server task for
>> handling USB interrupts on the Beaglebone Black. Here's the code I'm
>> using:
>>
>> rtems_interrupt_server_initialize(1, 1500, RTEMS_TIMESLICE |
>> RTEMS_PREEMPT,
>>     RTEMS_DEFAULT_ATTRIBUTES, NULL);
>>
>> rtems_interrupt_server_handler_install(NULL, AM335X_INT_USB1,
>> "USB_interrupt",
>>     RTEMS_INTERRUPT_UNIQUE,
>>     reinterpret_cast<rtems_interrupt_handler>(USB1HostIntHandler), NULL);
>>
>> I checked the return codes of both functions and it's always
>> RTEMS_SUCCESSFUL. At the same time I have a separate thread which is
>> constantly doing a printk for debugging purposes.
>>
>> Right now what happens is that the printk thread runs about 10-15
>> times and then the system hangs in the middle of the print. Am I doing
>> something wrong?
>>
>> Thanks a lot!
>> _______________________________________________
>> users mailing list
>> users at rtems.org
>> http://lists.rtems.org/mailman/listinfo/users
>>
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>



-- 

<http://www.tallertechnologies.com>


Federico Garcia Cruz

Software Engineer


San Lorenzo 47, 3rd Floor, Office 5

Córdoba, Argentina


Phone: +54 351 4217888 / +54 351 4218211


<http://www.linkedin.com/company/taller-technologies>
<https://www.facebook.com/tallertechnologies>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150714/404cc73c/attachment.html>


More information about the devel mailing list