From: Chris M. <a01...@dl...> - 2003-10-25 17:20:21
|
> You see I was telling you, ANTIC steels 30% of the cpu time, I will look to > see if I can find a work around for it... give me sometime to look at it. Ah, yes, I believed you. I just wanted to duplicate it here in the States! :) I have tried several experiments, and have found some interesting results. I turned on early detection of a frame in register B (RxDestiE bit). This yielded slightly better ping return times by a few millisecs. Then, I modified the cs8900a.c file to turn off Antic after polling finds valid packet. It turns Antic back on, after the frame has been copied to the input buffer. This is where things become interesting. My test was sending a ping packet once every 10secs. The packets that were returned were always returned within 20ms. All other packets were dropped. So, if Antic was causing most of the problem, I would expect the packets to come back eventually (with some packets having 200ms or longer return times), but they are just dropped. Also, the screen never blanks, so this tells me that we really only notice that a packet has been received during VBI. What I think is happening is that the cs8900a poll process takes too long during the active video portion of the screen, thus it doesn't complete before the OS must switch to a different task. So, all packets received during the active lines of the TV are never found. But, I do not know currently exactly how the Contiki OS works...looking into the source. Adam? Adam, do you know how Contiki multitasks and switches context? Is there a way to adjust the time between each task? (Just need a tutorial :-) Thanks, Chris |