anelok: more on USB

Werner Almesberger werner at almesberger.net
Sun Nov 3 23:55:45 EST 2013


Meanwhile I've tried to port the USB stack I used for atusb (which in
turn is derived from the stack in idbg) to the Kinetis series. It
still stubbornly refuses to work, but I think I can't be far from
success. Just have to find that silly mistake ...

I've been able to verify that the hardware is fine by running the
stack from  https://github.com/payne92/bare-metal-arm  which
cheerfully announces itself as

Bus 001 Device 036: ID dead:beaf  

As the "real" ID, I've tentatively assigned the USB PID 0xae70
(that's "AnELok, device 0"):

http://en.qi-hardware.com/wiki/USB_product_ID_assignments

Speaking of hardware, there two issues with the current design:

1) it's missing the 33 R series resistors on D+/D-. I found out about
   them only after discovering the "Kinetis L Peripheral Module Quick
   Reference" [1], which is the document that made off with all the
   useful details you'd hope to find in the reference manual, but
   won't.

   The resistors are merely "recommended", but I think it's better to
   have them. This means two more components in an already
   overcrowded area of the board.

2) Joerg has pointed out that the use of a via to connect V2 and V3
   [2] to ground is far from optimal and that it would be better to
   have a more direct connection.

To have a bit more room, I was thinking of moving some things that
currently sit between USB and the MCU to the other side of the PCB,
which is relatively empty. Joerg suggested a "bridge" design that
would also greatly improve the ESD protection, killing two birds with
one stone:

http://downloads.qi-hardware.com/people/werner/tmp/esd-moat-and-bridge2.png

Unrelated to all this, I found that I connected DISP_SCLK to the
wrong pin. It should be on PTD5 but it's on PTD6. Only the former can
be used as SPI clock. I'm currently bit-banging all SPI, so it
doesn't matter, but going forward, this wants fixing.

[1] http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KLQRUG.pdf
[2] http://downloads.qi-hardware.com/people/werner/anelok/tmp/anelok-20131005.pdf

- Werner



More information about the discussion mailing list


interactive