interrupt servicing problems

Geraads/Wiermans/Aerts sysdev at hf-electronics.com
Fri Jul 28 08:48:51 CEST 2006


On do, 2006-07-27 at 16:23 +0200, Jan Kiszka wrote:
> Geraads/Wiermans/Aerts wrote:
> > On do, 2006-07-27 at 15:04 +0200, Geraads/Wiermans/Aerts wrote:
> >> On do, 2006-07-27 at 14:12 +0200, Jan Kiszka wrote:
> >>> Geraads/Wiermans/Aerts wrote:
> >>>> On do, 2006-07-27 at 11:51 +0200, Jan Kiszka wrote: 
> >>>>> Geraads/Wiermans/Aerts wrote:
> >>>>>> We have problems getting a isr handler going, we did use some basic code
> >>>>>> from "rtai-3.3/addons/drivers/serial" a starting writing a new driver
> >>>>>> for our needs.
> >>>>> I recommend to check the RTDM interface for this (addons/rtdm): better
> >>>>> defined semantics (my believe :)), support for defining clean
> >>>>> driver/application interfaces, better portability (architecture-wise and
> >>>>> RT-extension-wise).
> >>>>>
> >>>>> For a usage example you may have a look this new benchmark (not yet
> >>>>> adopted by RTAI, AFAIK):
> >>>>>
> >>>>> http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/drivers/testing/irqbench.c
> >>>>>
> >>>>> Pick out the parts that relate to serial port + RTDM-IRQ (not the I-pipe
> >>>>> domain stuff).
> >>>> A lot of code for the small thing we want to do, we just want a
> >>>> transmitter empty interrupt from the serialport (uart) and service it. 
> >>>> You think using this code and stripping it down will do the job?
> >>> Ok, I see the issue (it's just that the example is known to work). What
> >>> about this:
> >>>
> >>> int irq_handler(rtdm_irq_t *irq_handle)
> >>> {
> >>> 	/* handle IRQ, somehow */
> >>>
> >>> 	return RTDM_IRQ_HANDLED;
> >>> }
> >> can't find RTDM_IRQ_HANDLED?
> > Jan, we used 0 as return value!
> 
> This would mean only one event - if there were at least one...
We changed it to RTDM_IRQ_ENABLE, as in your other email.
> 
> > 
> > Builden and trying, and no irq 4 serviced!
> > 
> > Message in kmsg of RTDM:
> > 	RTDM: INFO > IRQ: 4, INTRCNT: 0
> > 
> > More info:
> > 	Ubuntu system, kernel 2.6.15.7, rtai3.3, gcc3.3
> > 	hardware Dell dimension 2400, celeron.
> > 
> 
> I assume the line works flawlessly under Linux, doesn't it? Do you
> initialise the serial port like this (left out in my previous example):
> 
> http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/drivers/testing/irqbench.c#L287
> 
> Jan
> 
We added the line;
  outb(MCR_OUT2, base_adr + RT_SP_MCR);

in the initialisation of the module, now it works :), the rtdm version
and our old code...., we didn't insert it first because we had no idea
what the reason was, seems we were wrong.
After doing some reading seems to be that out2 does connect the UART
interrupt to the ICU :o

Thanks for the support,

Henk 






More information about the Rtai mailing list