Bluetooth Low Energy (AKA BTSmart)

Saturday, November 09, 2013
I've been working for months with a couple Bluetooth Low Energy chips -- originally the nRF8001 before settling on the Cortex M0 based nRF51822 -- and while there have been some hiccups with the nRF51 chips (anything real time is basically impossible, and I wish some of the peripherals were a bit more robust), it's hard to argue with the price. I'm convinced Nordic really has a winner here!  For <$2 in volume, I'm willing to work around some issues and they apparently have some updates in the pipeline that address the biggest shortcomings of their first generation chips (SPI slave support instead of UART only to talk to the outside world, etc.).

What's really impressed me, though, is BLE itself.  I was already convinced that BLE will become extremely important moving forward now that Android finally got it's act together and added support as of Android 4.3 (seriously, what was up with that?!).  Digging into the specs and design decisions a lot more, though, I've been consistently impressed with the choices they've made at the Bluetooth SIG.  They've made (in my narrow opinion) the right tradeoffs, and seem to have a good understanding of where they wanted to go with this new standard: genuinely low power, low cost, with very small, low data rate sensors in mind and a heavy focus on SmartPhones and coin cells.

It will likely be a while before we unveil a code base and some reference HW or some of the stuff we're working on, but it's pretty exciting technology (definitely the first time anything Bluetooth has seemed exciting in any case)!  It opens up a lot of opportunities for small, lean, nimble HW startups, and the price point and technical barriers have probably never been as low for small personal area sensor networks and anything connecting to a SmartPhone.

If you're looking for a good introduction to BLE, have a look at Bluetooth Low Energy: The Developer's Handbook from Robin Heydon (one of the people involved in the design of BLE so he knows what he's talking about).  It's readable, and does a good job of explaining not just the technology but the thinking behind many of the design decisions.  The data model itself is refreshingly simple, and everything is essentially organized around 'Services' and 'Characteristics', where services are basically just a collection of characteristics that are exposed on the BLE device (server), but it's well presented in the book, and hopefully you'll see more and more BLE tutorials and content in the coming months (including from us)!

Full story  | Comments (3)

LPC4370: Filling the Gap between Bare Metal and Cortex A

Sunday, October 20, 2013
The dual-core 204MHz LPC435x MCUs have been around for a little while now, and they fill a nice gap between entry-level bare metal Cortex M MCUs and high end Cortex A chips running embedded Linux, Android or complex RTOSes.  We've been using the LPC4300 family (mainly the LPC4357) for a while, and while the learning curve is steeper than entry level chips, it's been a great choice when we need more advanced peripherals or just pushing a lot of data around.

Specifically, they LPC43xx family can do a lot of the heavy lifting you might associate with Cortex A chips, and offer all of the connectivity and peripheral options people expect today (LCD controller, SDRAM, etc.) without the same steep learning curve.

The LPC43xx is also a natural choice for DSP and signal acquisition solution when you have hard real time constraints.  Single precision floating point acceleration and DSP-style SIMD instructions (single instruction, multiple data) enable more data processing with less clock cycles, and the ability to produce highly optimized code.

The family also come with a large block of fast, on-chip SRAM (264kB for the LPC4350 and 136kB for the LPC4357), and the ability to manipulate and get data off the chip quickly thanks to the high speed on-chip USB PHY (480Mbps compared to 12Mbps on other Cortex M MCUs).

Major Changes in the LPC4370

So where does the new LPC4370 fit into this already strong MCU family?  It build on the foundation laid by LPC4350 with two main new features:

- An 80Msps 12-bit 6-channel (multiplexed) ADC
- An additional 204MHz Cortex M0 core (for three 204MHz cores total)

The extra 204MHz Cortex M0 core provides extra processing power and allows you to offload certain processing tasks to their own core, giving you a bit more head room to do the heavy lifting on the main Cortex M4 code.

The biggest change, though, is obviously the unique 80Msps integrated ADC, making an extremely compelling solution for serious data acquisition needs!

With the new LPC4370, we have a highly efficient, low cost data pipeline in a single chip:

1. We can pipe a large amount of analog data into the LPC4370 via the new 80Msps ADC
2. The SIMD instructions and HW floating point acceleration on the ARM Cortex M4 allow us to do some basic DSP filtering on chip to reduce data output to something precise and reliable (IIR and FIR filtering are easily done on chip, for example)
3. The high speed USB PHY then allows us to push data out as fast as we can pull it in, where further processing or visualization can take place on the PC



Having the two complimentary ARM Cortex M0 cores allows us to offload non-critical tasks from the M4, such as running an RTOS, handling basic I/O or system monitoring, and dedicate the high performance M4 core exclusively to data processing and doing the heavy lifting for the signal processing.

The advantage of the new LPC4370 isn't just single-chip convenience and speed, though.  

12-bit 80Msps ADCs generally start in the $20 (15 EUR) range, and come in reasonably large packages (QFP48, etc.). Combining the high speed ADC and the MCU in one chip not only saves board space and layout headaches, but can drive the total BOM cost down considerably!

Having the ADC on the die also simplifies some of the layout requirements, and you only need to focus on the front-end signal conditioning, which can often be handled with a single op-amp and a few discrete components with a reasonably short, manageable path to the ADC pads.

LPC4370 In Action: Lab Tool

Given the peripheral blocks available on the LPC4370, it shouldn't come as a surprise that the first board making use of the LPC4370 is a signal acquisition tool: NXP's new Lab Tool (from Embedded Artists).

Lab Tool is an open source, low-cost expansion board and SW package based on NXP's LPC-Link 2 debugger, and can be run on the PC or on a low cost Raspberry Pi. It makes use of the LPC4370 on the LPC Link 2, adding some basic signal conditioning and input/output ports to the debugger:

- The high speed ADC is used to provide a 2-channel oscilloscope at up to 80MHz (presumably 40MHz useful data, re: Nyquist)
- The 10-bit DAC provides a +/-5V analog signal generator
- The SGPIO bus is used as an 11-channel 100MHz logic analyzer (including I2C/SPI/UART decoding) or as an 11-channel 80MHz digital signal generator

Dual Channel Oscilloscope



Logic Analyzer



Function Generator



Thanks to the LPC4370's processing power and integrated peripherals, Lab tool is able to offer a single chip and highly portable solution that can replace with many entry level bench-top tools, while maintaining an extremely competitive total BOM cost, in a package that you can easily stick in your pocket and bring with you almost anywhere on the road.

Further Information

For further information on the LPC4370, consult the LPC4370 product page at nxp.com, where the datasheet and user manual can be downloaded, and we'll try to post some concrete thoughts ourselves as we spend some time with this new chip as well!


Full story  | Comments (12399)

Electronic & Embedded Fundamentals

These articles are part of our regularly updated Fundamentals series and may be useful if you're new to electronics or embedded development: