Over the last several years we’ve built a lot of MSP430 based systems. The requirements were vastly different, but many of the designs had low power in common. With time we began seeing patterns in MSP430 development. A lot of these issues can be fixed and make your product last longer and work better. Here are the top 5 (actually 6) things you should watch out for:
- Missing the decoupling capacitorsThis was a surprise to us, but some designs miss the decoupling capacitors for the MSP430 pins. These capacitors are in some cases essential for the proper operation of the MSP430, especially when powered from a noisy DC/DC power supply. The best approach is to go pin by pin and make sure that each pin has everything it needs to operate properly. All DVCC, AVCC and VCORE need separate decoupling capacitors placed close to the pin to be effective. AVCC needs to be connected to the main power supply at only one point to avoid coupling noise to the sensitive analog circuitry in the MSP430.
- Connecting to GPIOs without Interrupt Capabilities
Not all GPIOs on the MSP430 can generate interrupts. Ports 1 and 2 are usually the only ports whose pins can, but this depends on the specific MSP430 and family. You should check the datasheet and User’s Guide. Without interrupts, it is more difficult to avoid polling and go to sleep to save power. GPIO wakeup is one of the best approaches to implementing low power, so don’t fail to take advantage of it.
Sometimes when GPIOs are in short supply you may need to sacrifice some capabilities, but there are other approaches for these cases.
- Failing to consider clock requirements
Getting the clock tree right in a modern microcontroller is often time consuming and full of tradeoffs. The MSP430 uses low frequency clocks of 32.768kHz for real time, but needs high frequencies to operate the CPU. High frequencies mean higher power, so limiting the frequency is important, as long as processing can complete in time. Some peripherals, such as USB and UART, may require external crystals to achieve a certain accuracy. Otherwise, the internal oscillators can be used.
- Not using Interrupts and Low Power
you’re using an MSP430, one of the lowest power MCUs out there. Arguably your application is battery powered, but it’s surprising how many designers still use polling and avoid interrupts. Unless an interrupt causes issues, you really should use them as much as possible to make sure dealing with events is low latency and so you can go to low power modes. Remember to keep Interrupt Service Routines (ISRs) as short as possible. Avoid using loops or calling functions in ISRs. Understanding the compromise between wakeup time and current draw can mean the difference between a product a user loves or hates.
- Failing to consider the supply voltage
This is a problem that often is completely forgotten until units come back from the field. There are various parameters that depend on the input voltage to the MSP430. Among the most important is the CPU frequency, which depends heavily on voltage. The higher the voltage, the faster you can go. When operating from batteries, you shouldn’t run the CPU at high frequencies if the battery voltage is out of spec. Some MSP430 peripherals have specific minimum voltages. Flash reprogramming needs a minimum of 2.7V, and the ADC typically needs 2.2V. The flip side is that low voltage means lower power, so you need to carefully consider what your application needs. The input and output voltages of GPIOs are likewise changed, possibly affecting communications with other devices.
- Not using the DMA
We know, the MSP430 has a unified data and instruction bus, which means that the CPU cannot operate at the same time as the DMA (stealing cycles). Still, for low power applications the DMA can offload a tremendous amount of data transfer work from the CPU, allowing a much lower power system. It also allows higher throughput. We’re always surprised how many people avoid using the DMA.
What do you think? Are there other issues that typically show up in low power designs like for the MSP430?