Re: Periodic processing/fast timer

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If you want to do it in the ISR, just put the code in the ISR handler in the
OAL (the section that normally returns the SYSINTR value). Normally, the
ISR just does minimal processing to determine the source of the interrupt
and returns the SYSINTR but nothing stops you from performing additional
processing there. Just keep in mind that you want to do a minimal amount of
work, since you're blocking everything else from running.

You could do this with an installable interrupt handler if you wanted to
keep the OAL clean. I assume this is a completely custom USB
implementation, and you're not trying to run the USB stack on top? Why not?

--
Dean Ramsier - eMVP
BSQUARE Corporation


"George M." <GeorgeM@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1107DD99-89B6-4B8F-AA41-B8A7E7B3D84B@xxxxxxxxxxxxxxxx
Hi,

I am trying to write an application that receives data off a USB device at
500Hz (every 2ms). I'm new to CE platform development so I'd like
suggestions on the best approach to do this.

For example, is there a way I can tie into the USB 1ms interrupt and write
the interrupt handler to process the received data? Another option I've
considered is a polling mechanism where I poll the USB device every 1 (or
2)
ms and check if there is any data.

With the second scheme I've looked into the mmtimer APIs, specifically
timeSetEvent. This looks like it may work and I've written a test
application that basically will call my callback function at the specified
periodic time. My concern with this method is what priority is this timer
event? Can this get preempted by higher priority tasks and thus skew my
polling period? How do I set the priority for this timer event (or
callback
function)?

I prefer the interrupt method but in a CE platform I haven't been able to
find how to tie into the hardware. I'm using the Intel PXA270 and ideally
I'd like to either use the hardware timer interrupt from one of the system
timers or as I mentioned before, somehow tie into the USB interrupt so I
can
be sync'd up with the USB bus.

Any direction on the best way to receive this data would be greatly
appreciated.

--
Thanks,

George


.



Relevant Pages

  • Re: Installable ISR - general questions
    ... The ISR (Interrupt Service Routine) is called by the interrupt ... handler installed by the OS. ... SYSINTR_RESCHEDULE tells the kernel that it should check if a thread ...
    (microsoft.public.windowsce.platbuilder)
  • Re: 5 devices sharing one irq
    ... And the usb devices I use are a external hard disk, ... The top half typically is what is wired to the interrupt and should complete ... each registered top half handler for that interrupt is called in turn ... things on an IRQ, though I bet someone somewhere has. ...
    (comp.os.linux.hardware)
  • Re: problem in interrupt handling
    ... If I want the program continue running, how to ack the exception ... Clear the corresponding bit in the register in the ISR? ... u have forgotten to acknowledge the interrupt in ur isr.unless ... help of intConnecti installed my own handler. ...
    (comp.os.vxworks)
  • Re: Has someone tried to add interrupt support to Riscy Pygness?
    ... anything you do in an interrupt ... If an ISR needs to store data between invocations, ... stored in static variables and does not need the stack. ... rather than trying to do a lot of processing in the handler ...
    (comp.lang.forth)
  • Re: Once more VIA VT6212 USB Chip Problem
    ... I checked the interrupt init and I can see they are all set. ... I tried my image on this board and USB works fine!! ... Bus 0, Device 1, Function 0 ... is found for following PCI Device ...
    (microsoft.public.windowsce.platbuilder)