I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods

Click Here!
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / WebPal
Overruns reading with wpflash
Should I worry about writing?

New MessageOverruns reading with wpflash (modified 0 times) m_bed
Profile
After months of procrastination, I finally got around to setting up a unit to reflash, and ran into trouble trying to verify that the connection is okay.

wpflash kept hanging while trying to read from the ROM, and I eventually determined that I had to cut back the amount of data per read command to < 16 bytes, or it would hang every time. I figured a 533MHz Celeron ought to be able to handle 115kB, but it appears not: at some semi-random point within the first few K, it apparently doesn't empty the FIFO in time, and wpflash is hosed.

If I recall correctly, I wound up disabling the hardware handshaking lines because they didn't seem to be working correctly. And the wpflash code, itself, disables CTS/RTS handshaking (presumably because Bill had problems with them, too).

So now I'm a little nervous about trying to write the flash: if I run into a similar problem in the other direction, I'll be pretty much screwed, since I won't have a way to download the prog.srec file again.

Do I need to worry about this? Or is the programmer code speedy and/or interrupt-disabled enough that it never gets overruns?

Ran

06-21-2003 05:36:25

New MessageRE:Overruns reading with wpflash (modified 0 times) bigbrd
Profile
I'm using a Celeron 833Mhz system with a buffered serial chips so I guess its fast enough to
not have overruns. I didn't turn on any flow control only because I didn't need it.

Here are some things you can try:

1. For reading, the wpflash program controls how much data is read each "request". So,
you could modify the wpflash source to request a smaller amount of data...it sounds like that is what
you did when you say you can read 16 bytes without overflow.

2. For writing, most of the data is going to be PC -> Webpal with only short ACKs in the
reverse direction, so I don't believe you'd run into an overrun problem on the PC side.
In theory, the PC would send as fast as it could and only have to read a short amount of
data to be read which should fit in the chip fifos. I've haven't had issues with the webpal keeping up
since its just in tight polling loop....no OS overhead, no interrupts being disabled too long, etc.

3. You could modify both the wpflash and the prog.srec program to use a slower speed.
For 9600 baud, use the value 12 instead of 1 and change all the SerialOpen routines in prog.c
and then rebuild. In wpflash.c, you can use the Linux defines...use B9600 instead of B115200.
If you want to modify the real bootp program also, its main.c where the SerialOpen
routines are. If you want to use other speeds, get the data sheet for the SuperIO
chip for the webpal and it contains some divisors you could use. At 9600 baud, its
gonna take about 25 minutes time to program all 1M byte so make sure you have a snack handy!

4. If, by chance, you bought 2 units, you can play the trick where you load prog.srec
into the RAM, pull out your "flash with the webpal SW on it" flash (with power still on)
and insert the second flash SIMM (again with power on) and then program the second
flash. Then, if you get a program
failure, you can still go back to the original SIMM to load prog.srec again. Obviously,
exchanging flash SIMMs while the system is running isn't a good idea, but people
have done this, especially when we were trying to get this running the first time
ourselves!

4. Worse case, if it fails, you can always send the flash to me to be programmed the
first time.

Bill

06-21-2003 10:21:38

New MessageRE:Overruns reading with wpflash (modified 0 times) m_bed
Profile
Thanks, Bill.

I went for it, and it worked. I'm still not sure what the problem with reading is, but it definitely looks like interrupt latency: I had to cut the "read chunk" down to 4 words to make it reliable.

What it looks like is that the UART FIFO is working, but it takes long enough for the CPU to get around to emptying it that it sometimes overflows. There doesn't seem to be any "official" way to set the interrupt threshold, unfortunately. I noticed when I checked with setserial that the port has "skip_test" turned on, but not "low_latency" (which might help: I'll need to do a little more experimenting).

I've read about people doing the hot-swap on the SIMM, but it gives me the willies. It reminded me of that old airline commercial: "Hi, I'm SIMMy! Fry me!"

Ran

06-22-2003 07:41:37

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3