[flashrom] Hmmm UBW?

Joseph Smith joe at settoplinux.org
Tue Mar 1 10:58:44 CET 2011



On Tue, 01 Mar 2011 04:01:59 -0500, Joseph Smith <joe at settoplinux.org>
wrote:
> 
> 
> On Mon, 28 Feb 2011 22:12:37 -0600, Марко Краљевић
> <krasnaya.zvezda at gmail.com> wrote:
>> On Mon, Feb 28, 2011 at 17:08, Joseph Smith <joe at settoplinux.org> wrote:
>> 
>>> http://www.schmalzhaus.com/UBW/
>>>
>>>
>> This is probably pretty pokey? I was thinking of making something
similar
>> with an AVR. I can't seem to find much information on speed capability
of
>> USB CDC / ACM devices though?
>> If they only support 115k or whatnot as the top end, it'll be pretty
>> painful, I'd think.
>> 
>> curious.
> 
> I was looking at some of the UBW tutorials and it appears you can set the
> baudrate to pretty much what ever you want. It is set in the PIC's
> "bootloader" / firmware and of course your PC (that is what you mean by
> 115k correct?). The PIC18 runs at 48 MHz. There is also a UBW32 project
> that runs a PIC32 at 80 MHz but I am not sure if that would be a overkill
> and it costs more. Any ways there are sparkfun modules for both versions
> and the PIC18 chip itself only goes for around $6-7 dollars. I just think
> it is really cool that the UBW was orriginally designed as a parallel
> replacement for bit-banging over USB-> serial. I think it would be very
> easy to add flashrom support for this device and there is enough GPIO's
on
> the PIC18 so you could support both LPC/FWH and SPI on the same device. I
> also like how "open" Microchip is with their products :-)
> 
> Anyways I don't know alot about PIC devices but I thought I would throw
it
> out there that it seems like 75% of the work has already been done on the
> UBW to make it a neat little cost effective external USB flashrom
> programmer.
> 
>
I also found this under the FAQ's:

Q: How fast is a UBW?
A: That question is somewhat ambiguous. I'll answer the question I _think_
you're asking: how many bytes/second can I pump down to the UBW? That
depends upon what USB "Class" the firmware you are using implement. The
maximum theoretical speed of these PIC USB parts is 12Mb/s (mega-bits per
second). With Firmware C, I get about 500 to 800 Bytes/second to come out
Port B pins. With a custom firmware I wrote for a client, I've gotten over
20K Bytes/second. If somebody develops a firmware based upon Microchip's
Mass Storage Class driver, or their Custom Driver, then it should be able
to reach 100K bytes/second if not more. Oh, and the RC oscillator on the
UBW runs at 4 MHz (or 20MHz for SparkFun version), and the internal PIC PLL
bumps that up to 96MHz, then divides down to 48MHz to run the USB engine
and the PIC core. Which means that these boards run at 12MIPS (because
Microchip has a divide by 4 on their core clock.)
A2: If you are looking for Fosc speed on all UBWs, it is 48MHz.


Q: Does it matter what baud rate I choose when I open the COM port to the
UBW?
A: Nope. It doesn't. There really is no 'serial' link between the PC and
the UBW. It is all through USB. USB does not have a 'baud rate' feature in
the traditional sense of RS-232. The USB host chip on the PC schedules the
bus transactions as quickly as it can, abiding by all of the protocol rules
that define USB. (i.e. no fixed baud rate) In a traditional USB to RS-232
converter product, the PC sends 'baud rate change' messages to the
converter chip, which then re-programs its RS-232 clock rate for
sending/receiving async serial data. The UBW does not currently have a true
RS-232 capability, so these messages are simply ignored by the UBW
firmware. The UBW simply uses the part of this standard USB RS-232
converter setup to the point where there is a getchar() and putchar()
function in the software of the PIC. The UBW does not then actually send
that data out its serial port. (It could, if one wanted to, but does not at
this point in time - FW D 1.4.2) Instead, it reads the data coming from the
PC and processes that data as commands. Thus, it makes no difference to the
UBW what baud rate or data bits or parity you use. HOWEVER - it does matter
if you select hardware handshaking. Why? Because your terminal emulator may
wait until certain handshake lines are asserted before sending data down to
the UBW. Since the UBW does not implement any of the handshaking lines,
this will never happen and your UBW will appear to be dead. So make sure
you DISABLE or turn off any hardware handshaking. Don't use software
handshaking either - always set it to 'off' or 'none'.

-- 
Thanks,
Joseph Smith
Set-Top-Linux
www.settoplinux.org





More information about the flashrom mailing list