Pr0f wrote:From a very quick digest of the datasheet for the CP2200, the places where a timer may be required:
Waiting for initialization after clock stabilized - this could be done simply by checking the interrupt flags to see if we got that interrupt or not - and wait on an interrupt polling loop until it was received.
Waiting for Flash Write - the write itself is done by hardware and no timers are required to manage the write - only to verify the process has completed - again it's flagged on interrupt register.
Reading packets from FIFO buffer in the CP2200 after interrupt - there is conditional requirement these are read withing 51.2us of the interrupt, otherwise a random read must be used rather than autoread. I don't know how latent the external interrupt line is (as that would have to be used if not polling for interrupt statuses on the default interrupt scheduler.
The chip seems to take care of a lot of the very low level stuff, provided it is serviced quickly by it's interrupt handler.
I had a quick look at where I use the hardware timer. I use it in about a dozen places.
1. For timing the route time in PING. which can be less than 1mS
2. As a random number generator for the TCP Sequence numbers
3. In the CP2200 initialization. 10 Seconds, 2mS, and 4 Seconds. There is also a 2mS, 1.5 Second, and a 250mS in the Auto-negotiation (Which is not yet implemented)
4. A 1 second delay when writing a packet to the CP2200
Without looking closely. I think A lot of the delays, will wait up to the time specified before deciding something went wrong.