...but at what cost

A project log for Tiny Bit Dingus

Every Day Carry bit flipper

ajlittajlitt 05/26/2015 at 19:504 Comments

Over lunch I got the mbed build of the USB_4 test project (USB-CDC) for KL43Z with GCC working. My first attempt at this a while back broke because of a duplicate _exit() definition, but looking closer showed a cpp file from the ARM tools target dir in the GCC target that doesn't belong. Delete, clean, and it built ok.

After verifying the built binary has the config bits correct (or risk soft-bricking without an SWD adapter handy) I flashed it with blhost under Windows, and the USB-CDC device showed up on my Linux laptop as soon as I plugged it in!

Exciting, right?

Well... it would be if I hadn't recently taken a look at some of the Gecko parts from SiLabs (inherited from the Energy Micro acquisition).

I used to ignore anything from SiLabs as they were stingy with documentation and tools for hackers. But within the last few months they added support in mbed for some of their EFM32 Cortex-M devkits. The EFM32HG "Happy Gecko" line caught my eye: Cortex-M0+ at 24MHz, 64K flash / 8K SRAM, crystal-less USB, on-chip regulator, ROM bootloader, and comes in QFN24. That's not as good as the Freescale KL27 I'm using here in speed and memory. What makes it better is it's fully supported in the mbed IDE, has a simpler bootloader to work with (USB-CDC + xmodem instead of custom HID), and is less than half the price of the KL27 ($1.94 qty1 for the '309 variant vs $4.39). Given that I can live with the limitations.

So I'm looking into that for the next rev. I'll get a better feel for it once the devkit gets here.


Eckhart Köppen wrote 10/30/2015 at 07:50 point

The Happy Gecko is quite nice! Most EFM32 parts seem to be very affordable, and I do like the EFM32 SDK much better than the KSDK. But the bootloader is just preprogrammed (i.e. not persistent), takes 16k and requires some modifications to the application: It needs to be starting at 0x4000 (can be done via the linker script, even in mbed in the online compiler), and you need to relocate the interrupt table (one line needs to be added in the application startup code).

  Are you sure? yes | no

ajlitt wrote 11/02/2015 at 20:03 point

True, they're a great value for USB enabled micros at the low end.  I would consider revisiting the part if I had a less open ended application.

  Are you sure? yes | no

Kuba Raczkowski wrote 05/19/2016 at 07:26 point

Any hint on getting this to work with the online mbed compiler? I can't seem to find the relevant piece of documentation...

  Are you sure? yes | no

ajlitt wrote 05/21/2016 at 22:25 point

Sadly KL43 isn't supported in the online IDE. However the FRDM-KL27Z seems to be getting some new additions from NXP in the sources, so maybe that will be mbed-ified soon. Note that FRDM-KL27Z covers only the KL27 32K and 64K flash variants, and not the 256K that I've used here.

Preliminary specs have been released on the KL28 series, which has more memory, higher clock speed, and the 2.0 version of the bootloader in ROM which does USB mass storage emulation.  With mbed support these would be perfect

  Are you sure? yes | no