Good news: DFU and boot loader finally work.
Here's a video to prove it:
http://downloads.qi-hardware.com/people/werner/anelok/tmp/Y-Box-DFU.ogg
Detailed timeline:
00:02 Y-Box in test fixture
00:06 Push Y-Box onto the contacts of the test fixture
00:08 I flash the boot loader via SWD from the Ben
00:10 First pass: writing the code to Flash
00:11 Second pass: verification
00:15 The Y-Box now contains the boot loader but no application
00:20 Connect USB
00:21 Red LED: waiting for enumeration
00:22 Both LEDs: enumerated, now waiting for DFU. This wait normally
ends after 1-2 seconds but is "forever" if there is no
application.
00:25 Run dfu-util on the PC to Flash an application
00:29 The boot loader now sees a valid application and starts it.
In this example, the application simply flashes the green LED.
00:32 Let's do it again (but without flashing, since we already have
an application in Flash)
00:35 Red LED: waiting for enumeration
00:36 Wait for DFU
00:38 Time out and start the application
This will be the standard way of flashing the firmware of the Y-Box.
A similar boot loader can also be made for Anelok. I don't plan to
have DFU on Anelok for regular use, but during development it's
certainly a convenient alternative to flashing via SWD.
This boot loader only handles the KL25/26 so far. For the CC2543,
I'll have to add a function that flashes it via the debug interface
and teach my DFU implementation to support alternative settings.
Alternate settings are DFU's way of implementing the concept of
separate domains, partitions and such.
- Werner
_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): [email protected]
Subscribe or Unsubscribe:
http://lists.en.qi-hardware.com/mailman/listinfo/discussion