Share via


IOT: Unboxing the MSP430FR5969 Launchpad and getting started on designing secure IOT (Part 1)

Next Blog on this subject (with solution to the problem stated)

There is a great blog on unboxing the MSP430FR5969 at: Unboxing (And Updating) A Texas Instruments MSP430FR5969 Ultra Low Power FRAM MCU, so take a look at that and get back here.  You will need to follow those instructions or else if you bought a device around 9/30/2014 it will not update the programmer and as far as I can tell there are no other instructions on how to get the update programmer to work with this Launchpad.

To use the Energia, you will seriously need to the read the EULA presented to you, really.  I would quote the part I like, but it might be misconceived.  I won’t link to it since you will have to sign an agreement and receive verification in about 1 minute that you have permission to receive the device.  Then you pay your money.

image

Also if you see a serial monitor like the image to the right or below for the Energia adaption of the Arduino IDE, if you get anything other than a screen that has the word “error” on it, then you didn’t do the instructions correctly.

Why use this product instead of the Arduino UNO or similar?

  • Cheaper.  Mildly slow Shipping included, no express. 
  • Energy Debugging, because software uses most of the energy in a MCU (duh). 

image

 

 

Getting started with this board

There is a difference with this board over the Galileo based on the Quark and the Amtel based Arduinos, for example:

  • Security baked in, the board has a 256-bit encryption built in, not in the cloud, not added on, not something you will get to when everything else is done.  It is on the board and in the MCU, it’s that simple.
    • Why is this important: Do you want your mother’s Pacemaker hacked?  (If you answer yes, get help.)
  • The MSP430 has always been very low power, so low power it can use RF energy in RFID configuration, and the current MSP430 versions might be able even run off of the power stolen from local AM radio stations.  It certainly can run off a capacitor for long periods of time.  (I plan on testing the AM radio station power utilization eventually.)
  • Both of those put together make the device awesome for use in Home Automation systems, after all even if you want your mother’s pacemaker hacked, you likely do not want the baby monitor you are using hacked, and you likely would want it to be low power as well.
  • Unlike the Amtel 8-bit processor the MSP430 is 16-bit, which means it can’t run the bloated GUI we all love, but it does do a pretty good job at calculations.  Of-course direct access to big amounts of memory is tricky, but usually the MSP430 would be an additional processor in that kind of system, likely acting as a very smart firewall.
  • Now that Near Field Communications has been blessed NFC, designing for the NFC is a way that you can put your software designs into hardware that people will purchase, unlike software that you will have to giveaway.
    • Think musical instruments/players, physics experiments, toys, home automation, security systems, wearable electronics, drones and medical devices
    • Special purpose Arduino GPRS, which can be used for voice phone communications, which call you to warn about a toilet water pipe breaking or a hot water tank leaking, or using one of the text to voice servers.
  • For more on the data specifications see:

 

As usual, you will need to set com ports and select the device

The MSP drivers appear to report the correct com ports to the Energia version of the Arduino IDE.  You will need to set the COM ports as expected if you have used the Arduino Boards before, in this case use the second of the two com ports, this is the “debug” port, the other is the UART Port.

image
image[9]

Next, you can stop here and get started like any other arduino board, but there is a difference remember: “Energy Tracing in your software” , that is: how can you improve how your software consumes energy?.

That’s right, if you download the Code Composer from Texas Instruments it will put Eclipse on your system and then load the Code Composer all ready for your use.  You can even write your sketches from there, which I like that feature in Visual Studio when using Visual Micro.  But the energy tracer for software is the thing I am interested in right now.

Using the Energy Tracer

You can either use the “Energy” tracer which gives you the energy in Joules or power which gives you the data in Watts.  As I watch from my house the dismantling of the local Nuclear Generator, and I observe my power bills, it becomes a real motivation to save power.  And it turns out that about half of the power of any device is dissipated by the software.  That is somewhat of a “Duh!” right?  If it wasn’t for the software then the hardware is kind of useless, like a television with no programming or a single, old style, non-smart, phone with no one to call.

Saying that, this is a great way to see how your code impacts power consumption.  And…likely a way to make sure you are on the leading edge of being green, like Kermit, or being conscious of your environment, or maybe you are just cheap like me.

So what does the Energy Tracer look like and why do you as a software designer care?

Here is what it looks like, and it looks like a CR2032 can run blinky on the board for approximately 3.4 days.  Over 11 seconds you were able to determine that the energy used was 88.08 mJ and the average (mean) power consumption by the circult was 7.81 mW, your voltage was 3.61 which means that you would need 3 rechargeable batteries if you went that way.  Average current was 2.17 mA.  Which makes sense, the CR2032 is typically rated at 210 mAH, so I would give it about 100 hours or about 3.4 days.

Now why do you care, isn’t this the Electrical Engineering’s problem?  Or maybe you are just hired to write software, not do energy analysis.  Guess what the Electrical Engineer is going to say?  She might say: “Well gosh, look at that, I have optimized my circuits, and I will certainly make it better if possible, but why isn’t software on point to do some trimming for once?  Here is the data that we gathered from the easy to use energy trace system.  And the data is definitely for the software folks to improve on.  How about this: I will cut my energy by 5%, how about you Software Developer, how about software stepping up to save power?”  And now you have to dig into your code and figure out where you have to fix things.  Lucky you…

Click on the tab that says “advice”, which I will discuss below this image:

image

The Advice Tab:

Looks like you have some ports in an uninitialized states, you have pins just radiating heat (that’s where the power goes to) and you haven’t used the low power mode state changes.  Which if you are just reading this article, I will have to leave you hanging till the next blog on this IOT subject. (see post: IOT: Lowering your software design’s power consumption (part 2) ).

image