Other Parts Discussed in Post: MSP432P401R, ENERGIA

Choosing a microcontroller (MCU) for your design is not all about the silicon. Sure, most vendors provide a list of all their wonderful features and peripherals, but most don’t talk about the hard stuff – how do you write and debug software for the thing?

I remember one vendor bragging about their debug port at a seminar I sat through a few years ago. I  was even excited when they talked about all the information that could be extracted from the port. But that changed once I read the last bullet on their slide, “Our hardware debug port is unencumbered by debug software.” I nearly fell out of my chair when everyone nodded and clapped in support of this feature. Was I the only one to realize all their users would now be foreed to write their own debugger software? Wow, that’s a pretty big task.

I laugh about that “feature” now, but I should thank them for more than the smile it still brings to my face. This incident started me on the road to understanding that a processor is more than just silicon. Without access to quality software and tools, silicon is just a smudge of polished sand. Put another way, a high-performance vehicle can't shine without gasoline.

So, let’s boil this lesson down to some practical assertions. For fun, we phrased them in the form of a negative. Don’t pick an MCU without the following…

  1. A good debugger. As we learned above, that doesn’t just mean hardware; your debugger really needs good software to go with it.
  2. IDE – some may say this stands for integrated development environment, but I like to think of it as an integrated debugger and editor. Either way, this tool provides a one-stop shop for writing and debugging your code.
  3. RTOS – a real-time operating system provides the software framework from which you can organize and schedule all events and tasks. Without it, you’ll probably fail when your boss says, “Oh, and I need you to add one more feature…” (Then again, maybe you never hear that from your boss).
  4. Drivers – and lots of other software libraries. Whether you need to send data over a serial port or read a sensor with an analog-to-digital convertor (ADC), good software is a must. Nobody ever writes everything from scratch anymore.
  5. Ability to get under the hood – so to speak. Using a library or device driver makes it easier to get your project running. And for many, that might be enough. But some will occasionally need to dig deeper. When optimizing for code size or performance, sometimes I just need to peel the onion back. Having a good tool set lets me get down to the guts of the machine without having to rewrite everything. Surprisingly, not everyone supports this anymore.
  6. Power, power, power – a lot of my projects have to run forever on a single battery. Here, your choice of silicon sure makes a difference, but without the right tools for the job, bad software can blow the power budget.

As we consider these elements,  let’s look at one of my favorite MCU’s - the MSP432™ MCU (i.e. the MSP432P401R). This chip has a lot going for it, built around the ARM® Cortex®-M4F running at 48MHz. This combination provides much needed horsepower for many microcontroller applications, while balancing low-power requirements when used in battery-powered systems. Unique to this chip is the analog-to-digital converter. This 14-bit ADC is really amazing. Its 13.2 ENOB allows me receive extremely accurate sensor data and even the ADC has a low-energy footprint.

Figure 1: TI's MSP432 MCU ecosystem

But as you know, it’s not all about the silicon. What makes it stand out is the ecosystem surrounding this MCU. Let’s count the ways:

  • Need a good debugger? Not only does TI provide two or three solutions of their own, they’ve lined up support from SEGGER, the industry leader in ARM debuggers. Though, we shouldn’t forget the other fantastic options provided by IAR and ARM/Keil.
  • IDE? Take your pick – TI offers Code Composer Studio™ IDE for desktop and cloud; an inexpensive option that keeps getting better every year. But those who’ve used ARM before, know that IAR and ARM/Keil really dominate the ARM IDE space. Of course, any of these (and a few others) will suffice, but most have a favorite they prefer to use. Haven’t you heard the phrase, “Give me IAR or give me death?”
  • Did I hear RTOS? Folks who have used TI digital signal processors (DSPs) and Sitara processors likely already know and love TI-RTOS. But long time microcontroller fans will probably be happy that these MCUs support FreeRTOS. Micrium’s uC/OS is another fan favorite, along with ARM’s RTX. Support for these 3rd party OS’s makes it easy for those migrating to MSP432 MCUs.
  • TI’s popular driver library (i.e. DriverLib) has provided the foundation for many MCUs. This software package containes a number of additional libraries and software options, including graphics and speech recognition.
  • Let me say two things – source code and CMSIS-Core. I like how TI ships source for everything. Even though I don’t typically want to look at the source code, it’s really comforting to know it’s available if needed. It’s also good to know TI has embraced CMSIS-Core. What’s that? ARM created the Cortex-M System Interface Standard (CMSIS) to drive portability and ease-of-use across their lineup. TI microcontrollers have always made it easy to access the register-level when you feel you need to go that deep, but building everything on top of the CMSIS-Core layer really makes ARM programmers feel at home (again, even if we don’t ever have to dig down very far).
  • However, if you’re new to MCUs or want to quickly prototype your application, you may want to consider the highly portable Energia MT which builds upon Arduino’s Wiring code interface. In fact, Energia MT is the first port of Arduino built on a Multi-Threading RTOS. This killer combination brings together Arduino ease-of-use with the robust determinism found in TI-RTOS.
  • Finally, I’ve become a big fan of TI’s EnergyTrace+ tools. Now I’ve got an easy, accurate way to see how little battery power my app requires. Oh, and I can do all that without ever pulling my venerable multimeter from the drawer. The IDE displays and records everything I need to tune what powers my design.

All-in-all, TI provides the tools you need to complete the entire development cycle on the MSP432 MCU. With so many options, I’m not stuck with just one– or worse, stuck writing my own tools.

Here are a few additional resources you might want to check out: