Site icon josh.com

An Ultrafast MSP430 SBW programmer for $4

tldr; if you don’t know what an MSP430 is, then skip this article. If you do know what an MSP430 is then read on- this article may change your life…

The TI supplied tools for programming their MSP430 microcontrollers are too slow and inflexible, so I made a new programmer that…

Additionally, there are lots of optional add-on features aimed at improving production flow:

The repo with everything you need is here:

https://github.com/bigjosh/pi-pico-sbw

Hopefully everything is documented enough there, but if not then you can ask any questions in the comments below.

A FULL PROPDUCTION PROGRAMMING STATION

CASE STUDY:

I was able to shorten a factory cycle time from 15 seconds (using MSP-FET) down to 1 second.

  1. The operator puts the unit into the programming fixture
  2. Auto target detection immediately begins the cycle
  3. The unit serial number is read out
  4. Code FRAM is programmed and verified
  5. User FRAM is programmed and verified
  6. Device is power cycled and power draw is measured
  7. LEDs and sound tell operator the cycle is complete and if the unit is pass or fail
  8. The operator removes the unit
  9. In the background the time, serial number, firmware hash, and power usage are logged to a google spreadsheet over wifi

It looks like this:

FAQ:

Q: What additional hardware do I need?
A: To program, you only need a Pico and wires to connect it to the target. If you want power measurement, then you also need a 100k ohm resistor. If you want online logging and/or firmware updates, then you need a Pico W. If you want LEDs or sound, well then you need those too. 

Q: Does this work with the MSP430xxxxx chip?
A: The code is currently only tested with MSP430FR4133 because that’s what I use, but should work with any MSP430 SBW chip – perhaps with a little adjustment.

Q: How is this so much faster than the TI tools?
A: The gains come mostly from (1) using the (poorly documented) quick read and write functions, (2) more efficiently utilizing the SBW bandwidth, and (3) avoiding overhead for things like USB setup and teardown on every pass.

Q: What if my target is self powered?
A: Do not connect the Vcc pin (only 3 wires between MSP and Pico).

Q: Why didn’t you use the awesome PIO hardware on the Pico to completely saturate the SBW interface?
A: If you look at the repo, you’ll see a PIO enabled branch. This branch works and is 2x-3x faster, but is not production ready. It was just too much complexity to be worth it for me. Once the programming cycle dropped from 10’s of seconds to milliseconds, I was satisfied. That said, if you are programming thousands or millions of these chips at a time, leave a comment below and we can save you some (more) time.

Q: What is that product you are programming in the case study?
A: That, my friends, is the AWESOME Time Since Launch by CW&T. You can (and should) buy one here…
https://cwandt.com/products/time-since-launch

Q: MSP430? Get an ARM and get a life. 
A: This product has a big 12 digit LCD display and only pulls about 2 microamps. It keeps its state constantly updated in FRAM so it can be recovered in case of a failure. It can also be directly powered from 2x Energizer Ultra AA batteries from 3.6V down to 1.8V (projected run time >>>50 years!). If you know an ARM that can do all that, please do let me know.

Q: Google Sheets?
A: I had been using AirTable but that was complicated and had occasional issues. Google sheets is fine and everyone alreday has it and knows how to use it so I can give anyone a read-only to the spreadsheet and they can do whatever they need to without me having to set up security and users and passwords. It will run out of steam at about 1 million rows, but I can deal with it then.

Exit mobile version