Re: Periodic processing/fast timer
- From: "Dean Ramsier" <ramsiernospam@xxxxxxxxxx>
- Date: Thu, 23 Mar 2006 09:55:13 -0500
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
.
- Follow-Ups:
- Re: Periodic processing/fast timer
- From: George M.
- Re: Periodic processing/fast timer
- Prev by Date: Re: Packet capturing in Windows CE - any idea????
- Next by Date: How can i switch to 16 bpp "paletized" color system
- Previous by thread: Re: Packet capturing in Windows CE - any idea????
- Next by thread: Re: Periodic processing/fast timer
- Index(es):
Relevant Pages
|