TMS320xF24xx to C2000 Piccolo TMS320F280xx Migration Overview
[Copy link]
TI's TMS320xF24xx family of DSPs was introduced in 1997 as the first devices in the C2000 product family. They are widely regarded as the first DSPs with on-chip flash and integrated CAN controllers. Features of the TMS320xF24xx include 16 PWM outputs for multi-axis motor control, 10-bit A/D converters up to 500ns, CAP/QEP motor peripherals, sector flash, and CAN and serial interfaces for communication. Designers take advantage of the 16-bit architecture and performance and use integrated peripherals for motor control systems to improve control capabilities, reduce the use of expensive components, reduce noise, and add advanced features.
Today, the C2000 product family continues to evolve to provide an even better family of devices. With multiple CPU performance configurations from 40MHz to 300MHz and a wide range of peripheral and packaging options, C2000 is the industry's broadest product family, providing developers with options to meet a variety of performance, functionality and price needs. Through enhanced analog integration, advanced peripheral capabilities, added communications and MCU programming convenience, C2000 provides the best DSP performance with MCU integration and ease of use. As designers look to add new features to their products, we will help designers transition to the latest Piccolo TMS320F280xx product family of C2000 microcontrollers. With enhanced performance, improvements in architectural control, increased flash memory capacity, more advanced control peripherals and most importantly, low cost, Piccolo MCUs bring multiple advantages to control systems.
Piccolo Overview
The Piccolo microcontroller family is a low-cost, highly integrated family that provides real-time control of low-cost power electronics. With four device families and more than 50 configurations within the family, Piccolo microcontrollers offer performance from 40MIPS to over 180MIPS, flash memory sizes from 16KB to 256KB, and package sizes from 38 pins to up to 100 pins. Piccolo microcontrollers offer a range of control-tuned devices at a low price to meet designers' control needs.
Compared to the TMS320xF24xx family, Piccolo devices offer a variety of innovations. The core has been improved, and peripherals such as pulse width modulation modules (PWM) and analog-to-digital converter (ADC) modules have been completely transformed to improve control applications. In addition, analog integration provides more cost-effectiveness and lower complexity for control systems by integrating multiple analog components that were previously dispersed and assembled on a printed circuit board (PCB). Overall, designers should be able to gain greater functionality, lower costs, and higher performance after migrating to Piccolo microcontrollers.
However, while these advances have greatly improved Piccolo MCUs for power electronics, TI understands some of the concerns designers face when migrating systems to new controllers. With a new core and new control peripherals, porting software and adapting systems to new microcontrollers can be daunting at first. Therefore, this article will take a deep dive into the differences between the TMS320xF24xx and Piccolo TMS320F28xx family devices. This article will highlight the new features of Piccolo MCUs, detail the differences facing TMS320xF24xx designers, and outline the migration path from TMS320xF24xx devices to Piccolo microcontrollers.
New C28x DSP core
Figure 1: C24x DSP core vs. C28x DSP core
While the TMS320xF24xx devices are based on the C24x DSP core, newer C2000 devices (including the Piccolo microcontrollers) are based on the newer C28x DSP core. The first difference you'll notice is that the C28x core is 32-bit, while the previous C24x core was 16-bit. The obvious benefit is that designers can work with a larger memory space, which means that newer C2000 devices have significantly more memory available for control applications.
Secondly, there are many benefits in computing. With 32-bit computing, the C28x core can now perform single-cycle 32-bit operations, including single-cycle 32 x 32 multiply-accumulate operations and even single-cycle dual 16 x 16 multiply-accumulate operations. As a result, control algorithms can now get more performance and precision and more accurate digital results from every megahertz. In addition, with the added pipeline and enhanced core architecture, C28x-based devices can operate at higher megahertz frequencies, have lower interrupt service routine latency and higher overall code efficiency. The C28x core is a perfect improvement over the C24x core in every aspect of operation.
Figure 2: Piccolo CLA coprocessor architecture
In addition to the C28x core, Piccolo devices add options for coprocessors or signal processing acceleration, including the new CLA coprocessor and VCU complex math accelerator. The CLA coprocessor is an independent floating-point processing core based on the C28x core. It has independent access to control peripherals, allowing dual-core operations. This provides advantages to control systems by providing additional processing performance and a modular control approach, so multiple control loops can be divided between the C28x core and the CLA coprocessor. For example, one loop can run a motor control algorithm on the C28x core, while the CLA coprocessor can focus on the motor position resolution algorithm to calculate the motor position through the resolver. Similarly, in addition to power control functions, there are many other use cases, including but not limited to multi-axis motor control, power factor correction (PFC) plus motor control, and even power line communication (PLC). In addition, with independent access to control peripherals, the C28x and CLA coprocessors can also provide complementary enablement of safety functions, cross-checking ADC results, PWM generation, and calculation results with each other.
Likewise, the VCU complex math accelerator provides improved computational performance for complex math operations, faster Fourier transform (FFT) operations, and Viterbi operations. With up to a 7x performance increase in calculations such as the Viterbi butterfly, the VCU accelerator enables higher signal processing performance in low-cost devices. This is particularly useful for applications such as power line communications (PLC), which require advanced signal conditioning and processing capabilities to transmit and receive over noisy power line media. Instead of providing a secondary processor to manage the communication link with the VCU, communication-based algorithms run on a single device to reduce system cost and power consumption.
Advanced Control Peripherals
Figure 3: TMS320xF24xx Event Manager
In addition to the push for DSP processing cores, we also offer a variety of PWM and ADC peripheral innovations in the Piccolo family. To recap, in the TMS320xF24xx family, the PWM outputs are part of the "Event Manager" module. In the Event Manager, up to eight PWM outputs can be generated using two 16-bit timers and five independent compare match checks. Of these eight PWM outputs, six are generated in complementary pairs, meaning that one of every two PWM waveforms is the forced inverse of the complementary waveform in a pair. These six PWM outputs can also be generated using only a single compare match check for each pair (in addition to the zero and period match events). Programmable dead-band logic can be applied to the rising and falling edge delays of these six waveforms, and note that both delays must use the same dead-band value. In comparison, each of the remaining two of the eight PWM outputs can be independently generated using a separate compare match check (in addition to the zero and period match events). However, these two PWM outputs do not support any dead-band logic. Therefore, in total, each PWM output from the event manager can be generated from at most 1 compare match, while the dead-band logic can only be used for six of the eight PWM outputs.
Among other features, the Event Manager PWM provides trip logic that can asynchronously force six of the eight PWM outputs into a high impedance state for system protection and safety. In addition, the Event Manager's time base is shared with three event capture units and a quadrature decoder interface, which is a significant departure from the more modular approach of the Piccolo microcontrollers. Unlike the Piccolo microcontrollers, multiple Event Managers (EVs) on the TMSxF24xx devices cannot synchronize their time bases together.
Figure 4: Piccolo TMS320F28xx ePWM module
In contrast, with Piccolo microcontrollers, the PWM outputs are part of separate and independent PWM modules. Each PWM module has two PWM outputs that can be generated from a single 16-bit timer and two independent compare match events (in addition to zero and period match events). The 16-bit timer has up, down, and up/down counting modes, of which the down counting mode is a unique feature of Piccolo MCUs. In addition, the PWM of Piccolo microcontrollers can generate synchronous or asynchronous waveforms, and even PWM with independent asynchronous dual-edge duty cycle control. Some Piccolo devices even include a revolutionary high-resolution PWM mode, where designers can achieve edge position resolution as low as 150ps, providing continuous high-precision control at high-frequency operation. Each PWM output also includes dead-band logic with high-resolution performance, whereby dead-band delays can occur in half-cycle increments. This can further reduce power switching losses in control systems.
Additionally, users can independently control the polarity of each PWM output in the PWM module, which means that the Piccolo microcontroller's PWM pairs are not forced to complementary pairs as in the TMS320xF24xx. Also, unlike the event manager's PWM, the Piccolo microcontroller's PWM module can synchronize the time base with a configurable time or phase offset; therefore, its functionality can create more advanced time synchronization systems. However, similar to the event manager, the Piccolo PWM also has trip zone logic, but this has been further expanded with one-time PWM tripping and even cycle-by-cycle PWM current limiting operations. In addition, Piccolo's PWM has been further expanded on the trip function of the TMS320xF24xx series, it provides the option of forcing the PWM into a high-impedance state, and can set high or low trip conditions, thereby achieving more powerful safety and protection functions through trip zone logic.
Comparing the ADCs of the Piccolo microcontrollers and the TMS320xF24xx devices, we can see that the Piccolo microcontrollers offer several advantages. First, the Piccolo ADC provides 12 bits of resolution, while the TMS320xF24xx provides 10 bits of resolution. The Piccolo microcontroller's ADC also has a faster conversion rate, with a rate of up to 4.6 megasamples per second (MSPS) compared to 1.18 to 2.67MSPS for the TMS320xF24xx devices. Therefore, the Piccolo microcontroller's ADC can not only more accurately display analog signals in the digital domain, but also capture and convert signals to the digital domain significantly faster. In terms of architecture, the Piccolo microcontroller ADC provides two independent sample-and-hold units, while the TMS320xF24xx devices only provide one sample-and-hold unit. With the synchronous dual-channel sample-and-hold function, the Piccolo microcontroller can synchronously sample the phase currents of motor applications, or even synchronously sample current and voltage measurements. From an operational perspective, Piccolo is based on a start-of-conversion (SOC), while the TM-S320xF24xx devices are based on an automatic sequencer. While the Piccolo microcontroller can create a continuous series of conversions from a single trigger, the ADC in the TMS320xF24xx family is based on an automatic sequencer, so the ADC of the Piccolo microcontroller uses an SOC, where the trigger source, sample window size, and channel can be specified for each conversion. This provides maximum flexibility for the ADC resource to meet different system requirements.
Finally, the difference between the Piccolo family and the TMS320xF24xx family lies in the implementation of the event capture (CAP) and quadrature encoder interface (QEP) in hardware. Recall that the CAP and QEP peripherals on the TMS320xF24xx devices are integrated into the event manager (EM), which shares timer resources with the PWM outputs. In contrast, in Piccolo microcontrollers, the CAP and QEP functions are located separately in independent modules with independent time bases. In terms of functionality, the capture units of Piccolo microcontrollers operate in a similar manner, but also have some additional features. For example, some Piccolo devices even include a high-resolution capture function, which can measure the difference between external pulses with a typical resolution of 300ns. This results in lower latency system feedback. In addition, each event capture module can operate in PWM mode, providing additional PWM outputs in addition to the PWM outputs of the PWM module.
As briefly mentioned earlier in this article, Piccolo includes many architectural enhancements that reduce control latency, lower system cost, and simplify system design. These enhancements include on-chip comparators, on-chip programmable gain amplifiers (in select devices), low-latency PWM tripping, dual sample-and-hold ADCs, and integrated life support functions.
Figure 5: Piccolo TMS320F2805x architecture block diagram
In the process of feeding current and voltage measurements back to the Piccolo microcontroller, the ADC input pins are also fed into the on-chip comparator through the integrated DAC for over-current or over-voltage comparison. If the system state is outside the determined "normal" state, the comparator will trigger a direct asynchronous trip to set the PWM output, turning off the PWM output in as little as 30ns. Alternatively, as mentioned earlier, the PWM can be tripped cycle by cycle, providing current limiting operation rather than system shutdown.
In the Piccolo TMS320F2805x devices, programmable gain amplifiers (PGAs) can even be integrated on-chip, taking the input from the ADC pins and amplifying it before feeding it into the ADC comparators. Not only do PGAs reduce system cost, since these PGAs are required externally in the system (when not integrated on-chip), they can also be very useful in applications such as motor control by extending the ADC range as the motor speed decreases.
As mentioned previously, the ADC in the Piccolo microcontroller contains dual sample-and-hold units; however, in the TMS320xF24xx family, the ADC only provides one sample-and-hold unit. While the TMS320xF24xx ADC can attempt to emulate simultaneous dual sampling, with a typical delay of 850ns between samples, the Piccolo microcontroller’s ADC has two full sample-and-hold units with no delay between simultaneous samples. This is very important when it is necessary to measure simultaneous phase currents or simultaneous current and voltage readings. Any delay between samples will introduce errors in the system modeling and even in the resulting system control. The Piccolo microcontroller eliminates this error, allowing for more accurate system measurement and control.
Finally, Piccolo microcontrollers offer additional life support circuitry compared to TMS320xF24xx devices, which reduces the cost and complexity of powering and timing Piccolo devices. Piccolo microcontrollers feature an on-chip voltage regulator (VREG) that allows designers to provide a single 3.3V input to the device. VREG seamlessly and autonomously adjusts the input power to the 1.8V rail required by the analog subsystem. Similarly, Piccolo devices feature power-on reset (POR) and brown-out reset (BOR) functions, eliminating the need to add external circuitry to monitor the device's power input. It is also worth mentioning that Piccolo microcontrollers offer two on-chip oscillators with clock failure detection, which seamlessly switch to a backup clock source in the event of a failure.
Software, Programmability, and Support
From the software point of view, Piccolo devices have rich software resources compared to the TMS320xF24xx series. Piccolo devices are all programmable in C language, and some of them even come with floating-point support. With unique device libraries, you can easily program and develop with Piccolo. For example, the IQMath library provides the benefits of floating-point development for fixed-point devices, making development easier while providing better code portability between fixed-point and floating-point devices. There are also DSP libraries for simple FFTs, FIRs, complex math, signal generation, etc. In addition, if you are familiar with the motor control library on TMS320xF24xx devices, this library has been updated and optimized for many years and has become the latest and fully optimized motor library for Piccolo microcontrollers. You can find the same functions as the motor library for TMS320xF24xx devices, but we have expanded this new library with updated functions, including control of 3-phase sensing and sensorless motors. In addition, we provide optimized application libraries for solar and digital energy-based development, providing developers with a complete set of application-tuned libraries to shorten development time.
Figure 6: controlSUITE software suite
All C2000 software is provided through the controlSUITE TM software suite. controlSUITE is a completely free single access point for all C2000 device software, development kit resources, software libraries, documentation and design support. controlSUITE is equipped with a graphical user interface (GUI) for easy access to C2000 software and documentation, and it also provides an automatic update utility to keep users updated with the latest C2000 software and documentation. Users can access the previously mentioned device and application libraries as well as detailed example projects to quickly get started with C2000 devices. Detailed documentation is also provided, including user guides, application manuals and white papers. No need to search the web for device titles, libraries or documentation, controlSUITE is a centralized resource for all C2000 microcontroller needs.
Figure 7: Code Composer Studio IDE
C2000 device development is easier with the Code Composer Studio v5 (CCS) integrated development environment (IDE). CCS is an Eclipse-based IDE that provides familiar functionality to most embedded designers. It includes an optimizing compiler, debugger, profiler, and simulator. In addition, developers familiar with RTOS embedded development can also use the SYS/BIOS RTOS included with CCS.
C2000 also offers a variety of device- and application-based resources through a wide range of development tool kits. Users can experience device-level programming and prototyping with the introductory example projects in the C2000 controlSTICK and C2000 LaunchPad development kits. For system-level prototyping, users can purchase the C2000 Experimenter Kit, which provides breadboard area and access to all Piccolo MCU signals. For professional system developers, C2000 microcontrollers also offer a wide range of application development kits. From motor control to digital power, from solar to lighting and even PLC, C2000 microcontrollers offer a wide range of development kits to help designers accelerate application development. For a complete list of all C2000 development kits, visit www.ti.com/c2000tools or view the Kits section of controlSUITE.
The backward compatibility of the C28x core allows you to easily migrate TMSxF24xx device code. CCS has compiler options that can import assembly code from C24x-based devices into newer C28x-based C2000 devices. For step-by-step migration information, see Appendix C in the TMS320C28x CPU and Instruction Set Reference Guide link in the Getting Started Resources section. Likewise, a user guide is available that details instruction set compatibility and software migration requirements when porting C24x-based device code to C28x-based devices. Finally, if you have questions, our engineering team is here to help. Visit the E2E forum to get answers to your questions and resolve any challenges you may encounter during your transition to Piccolo MCUs. Visit e2e.ti.com and navigate to TMS320C2000 32-bit Real-time MCUs under the Microcontrollers section on the left navigation bar.
summary
Piccolo microcontrollers are the result of an all-around improvement of the TMSxF24xx series. From the C24x core to the new C28x core, designers will see significant performance improvements, increased memory capacity, and ease of programming. In addition, new performance options such as the CLA coprocessor and VCU accelerator further improve system performance, add powerful control loops, and bring a unique control platform.
From the perspective of controlling peripherals, Piccolo microcontrollers have improved PWM, providing more flexible PWM generation, high-resolution PWM capabilities, enhanced dead-zone support, and more advanced PWM tripping capabilities. After migrating to Piccolo microcontrollers, designers should be able to achieve higher control performance, power efficiency, and system safety. Similarly, the resolution of Piccolo microcontrollers has been improved, which can achieve more accurate and faster conversion speeds, thereby realizing higher frequency control loops, while the dual sample and hold function can achieve synchronous zero delay when sampling multiple inputs.
The architecture of the Piccolo devices has also been transformed to reduce control latency and lower system cost. On-chip comparators provide an asynchronous, direct, low-latency path to trip the PWM outputs without CPU intervention. Similarly, dual sample-and-hold ADCs enable synchronous phase current measurement or synchronous voltage and current measurement for power electronics feedback. Integrated power-on reset support, brown-out reset support, and voltage regulators further reduce system cost by removing expensive components previously required to support the devices.
Finally, to help developers port their code to the new Piccolo microprocessor family, the Code Composer Studio (CCS) IDE provides compiler options that accept C24x-based assembly code, laying a good foundation for developers to migrate code to C28x-based devices. Unique device libraries such as the IQMath library, DSP library, floating-point math library, and signal generation library simplify the programming process of common operations performed using C2000. Similarly, developers can use adjusted application libraries such as motor control library, solar library, and digital energy library to quickly enable the system to run well with optimized code. We also provide detailed hardware application kits that can provide developers with a suitable platform for learning and development of related terminal equipment. All of this can be obtained through the C2000 controlSUITE software suite, which users can use as a single access point to obtain all the resources needed to develop with C2000 microcontrollers.
So, start using Piccolo microcontrollers today! With the unique advantages offered by Piccolo devices, developers can achieve higher performance, power efficiency and robustness than TMS320xF24xx-based applications. In addition, a wealth of software, hardware and documentation resources are available to meet your support needs at any time, and if you still have questions, our E2E forum can also help you solve technical problems.
|