Re: Fast performing Timer APIs in WinCE...
- From: kamali.srinivasan@xxxxxxxxx
- Date: Tue, 28 Oct 2008 01:05:36 -0700 (PDT)
On Oct 24, 8:24 pm, Valter Minute
kamali.sriniva...@xxxxxxxxx wrote innews:4412b29f-d25d-4be6-9b74-3d84b95a1f5b@xxxxxxxxxxxxxxxxxxxxxxxxxxx
I am looking for Timer APIs in WinCE6.0.I need to start a
with some timeout value and i need a callback to be signalled
after the timeout value expires.We need to use these timer APIs in
our storage driver .Since it is a driver we cannot use the Timer
APIs like SetTimer ,KillTimer as they are application timers and
require a message loop.Thus we went in for using the timer driver
APIs (Mmtimer library) like timeSetEvent() and timeKillEvent() but
on using them the read/Write performance of the storage driver is
bad even after disabling the cache manager.Is there any other
timer APIs which would speed up the performance.I would really
appreciate if someone could help me out.
What's the resolution that you need for those timers?
If you need milliseconds you may use Sleep() in a high-priority
Training, support and development for Windows CE
(the reply address of this message is invalid)
Thank you for all of your replies.I am sorry for not giving a clear
picture of what i am trying to do.
During Read/Writes from the NAND flash we use interrupt(interrupt gets
signalled once NAND flash is ready)to determine if NAND flash is ready
for accepting the next command/address/data.Each Read/Write consists
of a sequence of command,address and data input.Thus each read/Write
consists of waiting for the interrupt several times .For each command/
address/data input we start a timer with a maximum timeout value(ready
busy time of NAND) and wait for the interrupt to occur to determine if
NAND flash is ready .once the interrupt occurs we check if our timer
is still running.If running we stop the timer and return TRUE else we
return FAILURE Thus since waiting for the interrupt and checking
timeout occurs several times during a read/write the read/write
performance gets hindered.We do absolutely nothing in the callback
except for stopping the timer,if it has not already been stopped.But
the callback will not be called in our case since maximum timeout has
been given. I use interlocked functions to update a timer status
variable to STOP,RUNNING etc..Could this degrade the performance?
I get around 6 Mbps and 4.50 Mbps for read and write while using
interrupt without timer whereas i get only 4.07 and3.59 Mbps while