Y-Box: more DFU, and beyond

Werner Almesberger werner at almesberger.net
Tue Apr 1 08:36:49 EDT 2014

Ron K. Jeffries wrote:
> Most excellent. Impressive progress.

Thanks :) Much slower than I hoped, but if you sit very still and
look carefully, you can see it advance ...

> Remind me does your design have any way one might (with software changes)
> be able to hack connection to an I2C device and/or another SPI device?

Ah, which design ? :) Anelok ? Y-Box ? Or the platform in general ?

Instead of trying to use Anelok and Y-Box for something they're not
really designed to be good at, it would be much easier to just spin
a board that does exactly what you want.

You can basically copy and paste from the hardware design, and you
can reuse all the software (with some changes, of course, also
depending on what exactly you're after), so it's not as if you'd
have to begin from first principles.

So that would be the "platform" (KL2x chips). Anelok has very few
spare pins and it'll still change. Y-Box is a bit more stable, has
more spare pins, some of which go to solder pads. But it's still a
far cry from anything you'd have with a board specifically designed
for development and experiments, like Arduino, RPi, FRDM-KL2x, etc.

> So what is the next similar MCU model that will offer more pins for serial
> connections to sensors.

Oh, there are plenty of pins and functions. If you look on pages 51
to 53 of
you can see that many of the hardware functions are available on
multiple pins. (SPIx_yyy is SPI function block #x, I2Sx_yyy is
I2S function block #x, TPMx_CHy is channel y of timer #x, and so

> My thought is when Anelok is complete and a shipping product will it be
> feasible for somone (not me, as I lack required skills)

Heh, you've been saying for years that you lack the skills. Had you
made the effort of actually acquiring them in all that time, you'd
probably be selling your own boards by now, and proudly wear an
"Arduino Slayer" t-shirt ;-)

> to take your time.
> design and modify for similar NXP mcu that has more ports available.

I'm using a Freescale KL2 chip family. And yes, you could easily
adapt this to other chips from the same family. I don't support all
the function blocks (e.g., I2C, I2S, UART, and a few others are not
used by Anelok), but you can find code for some of the other things.

Porting to NXP would be a bit harder since you'd have to redo
everything that talks to the hardware, including the USB driver.

> Your work with e.g. DFU support can be leveraged for use cases different
> than Anelok but uses e.g. the disolay and input wheel and the radio.

The DFU code consists of the USB driver (chip-specific), the USB
stack (very basic, essentially portable, e.g., it's the same stack
atusb uses, though I had to make a few small modifications for new
things I need in Anelok and Y-Box), the DFU protocol engine (idem),
a chip- and/or platform-specific Flash driver, and platform-specific
code that brings up the board, runs USB, and whatever else you want
to do at that point.

So if you keep things simple, it's not a big deal to add DFU to a
KL2 project. Also extending this to other members of the Kinetis
family shouldn't be too difficult.

> This could evolve into a really cool maker platform.

These Kinetis chips are indeed quite nice. They're very feature-rich
(some even with USB host), have a decent amount of memory, and are
inexpensive. The documentation has its ups and downs and Freescale's
evaluation boards have their quirks, but none of these are truly

Ah, before you fire up KiCAD and start you own design, you may want
to have a quick look at the competition:

- go to Digi-Key (www.digikey.com),
- search for "freedom kinetis",
- click on "Evaluation Boards",
- have a look at data sheets and prices.

They even have Arduino-compatible headers :)

- Werner

More information about the discussion mailing list