Eliminating Software Failures with MSP432[Copy link]
Debugging large software programs is always a challenging task; often, it is difficult to know where to start! The MSP432 low-power and high-performance microcontrollers (MCUs) provide an advanced debugging tool for the MSP family of MCUs: Serial Wire Output (SWO) Trace. This tool helps debug complex projects, trace multiple events, analyze application performance statistics, and trace large data flow graphs. The MSP432 MCU features an ARM Cortex-M4F CPU, and the ARM hardware provides modules that can be used for debugging purposes. In particular, two components—the Data and Watchpoint Trace Unit (DWT) and the Instruction Trace Macrocell (ITM)—can be used to find out what is happening within a specific memory address when different functions are called, or how an interrupt occurs. When these events occur, data is output via the Serial Wire Output, which is where the tool's name comes from. TI's Code Composer Studio (CCS) provides three easy-to-use functions: Statistical Function Profiling, Data Variable Trace, and Interrupt Profiling. Statistical Function Profiling shows not only which functions are called in your program, but how often each function is accessed. This can be helpful when you want to reduce the power or resource consumption of your program as a whole. If you optimize a function that is called frequently, it will have a much greater impact than just focusing on a function that is called once. Data Variable Trace allows you to see the overall behavior of a memory address or variable over time. You can see if a counter is working correctly or if a variable is responding and changing correctly. Interrupt Profiling can help you understand how interrupts work. You can see when interrupts are entered and exited, and if they are preempted. Finally, CCS gives you the option to completely customize how you use SWO Trace. With Custom Core Trace, you can pick and choose what triggers the output! One thing to keep in mind is that this nifty tool is only available with MSP432 MCUs, so grab a LaunchPad development kit and try it out for yourself! This short video will help you get familiar with the tool.