Re: Fast performing Timer APIs in WinCE...
- From: Bradley Remedios <bremedios@xxxxxxxxx>
- Date: Tue, 28 Oct 2008 09:57:29 -0700 (PDT)
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
It sounds like you are using the timer to see if the interrupt
completes in time (based on maximum ready/busy times in data sheet.)
It would be much simpler to simply use the eventing mechanism that is
provided by writing an IST.
If you are using interrupts I would assume that you are likely already
using an IST, I would just call WaitForSingleObject on the IST event
(note that on some system that provide interrupts on both edges you
will get a trigger of the event when it goes busy.)
Hope this helps,
- Prev by Date: Re: Can't run eboot.nb0.
- Next by Date: Re: Compatibility issue
- Previous by thread: Re: Fast performing Timer APIs in WinCE...
- Next by thread: Re: Fast performing Timer APIs in WinCE...