山东五莲红:白皮书:Stellaris? LM4F 系列微控制器(zslcn周生烈编译摘注)

来源:百度文库 编辑:偶看新闻 时间:2024/05/07 09:34:46

 

http://www.ti.com/lit/wp/spmy007/spmy007.pdf

白皮书:Stellaris? LM4F 系列微控制器(zslcn周生烈编译摘注)

DSP,MAC,SIMD,API,乘法部件,除法部件,浮点指令

 

Miguel Morales

Director of Marketing Stellaris Microcontrollers  Texas Instruments

 

Introduction  简介

Stellaris? microcontrollers (MCUs) were the first MCU on themarket to be based on the ARM? Cortex-M core, an architecture that hasquickly become a top choice for many developers across the globe. Since itsestablishment, the Stellaris product line has remained true to its originalgoals – providing the broadest portfolio of highlyconnected, low cost and easy-to-use 32-bit microcontrollers.  The latest Stellaris LM4F series refines the offering of MCUs,greatly  improving performance andraising features to a new level of quality.

Stellaris?微控制器(MCU)是市场上基于ARM? Cortex- M内核的第一个MCU;这种架构已迅速成为世界各地许多开发商的首选架构。自从这种架构构成以来,Stellaris产品系列一直遵循着其既定的目标--保证所提供的32位微控制器,具有高度的可连接性、适应范围又最为广泛的组合包,而且成本低,易于使用。最新的Stellaris LM4F系列更是优化了所提供的MCU,极大地改善了性能,提升了功能,使系列产品提高到一个新的质量水平。

 

An Introduction to theStellaris? LM4F Family ofMicrocontrollers

 

Leading analog integration, best-in-class low-power consumptionand floating-point performance in next generation Stellaris ARM? Cortex-Mmicrocontrollers

第二代Stellaris ARM?的Cortex- M的微控制器,具有领先的模拟集成、最好一流的低功耗和浮点运算性能

Stellaris LM4Fmicrocontrollers take advantage of two significant technologies: the latest ARMCortex-M4F core andthe design techniques and process technologies perfected at TexasInstruments.  The result is a 32-bitmicrocontroller family with processing performance that is more effective perclock cycle, integrated mixed-signal circuits that are on par with traditionalstandalone components, flash memory with erase-write endurance that isbest-in-class and power consumption that is highly competitive with other32-bit MCUs in both active and standby modes. Such qualities will furtherincrease the breadth of applications powered by Stellaris MCUs and enableapplications that were not previously feasible.

Stellaris LM4F微控制器吸取了两类重要技术的技术优势:最新的ARM Cortex -M4F内核,和德州仪器公司完美的设计技术及工艺技术。这就使得一个32位微控制器具有更高的处理性能、能使每个时钟周期更有效、使集成的混合信号电路可以与传统独立组件的电路相比美、有最好一流的擦写耐久的闪存、以及在运行和待机模式的功率消耗方面与其他32位MCU相比 具有高度的竞争力。Stellaris MCU能力的这种高素质,将进一步扩大其应用范围,使它们可以应用到以前难以胜任的应用领域中。

  The major features ofStellaris ARM Cortex-M4Fmicrocontrollers are depicted in the block diagram of Figure 1. A more thoroughlist can be found in the product data sheets.

  图1的方框图,说明了Stellaris ARM Cortex- M4F微控制器的主要特点。一个更完整的列表可以在产品数据表中找到。

Fig.1-Block diagram of TI’s StellarisLM4F series of microcontrollers.

图1--TI的Stellaris LM4F系列微控制器方框图

 

ARM Cortex-M4F:Higher performance, still compatible

ARM Cortex - M4F:性能更高,保持兼容

 

The Stellaris LM4Fseries makes use of the most advanced ARM architecture core formicrocontrollers, the Cortex-M4F.  As a 32-bit architecture, Cortex-M microcontrollersenjoy a rich instruction set with far greater flexibility than 8- or even16-bit architectures and can operate on data that is up to 32-bits wide withease. The long and successful history of the ARM architecture in embeddedapplications assures the greatest selection of third-party hardware andsoftware support, pre-packaged off-the-shelf software like stacks and real-timeoperating systems (RTOSs) and experienced engineering  and programming personnel for anyproject. 

Stellaris LM4F系列使用最先进的ARM体系结构 Cortex-M4F 为内核,用于微控制器。作为一种32位的架构,Cortex-M的微控制器,有远比8位、甚至16位架构的灵活、丰富的指令集,能方便地对直至32位的数据进行操作。ARM架构在嵌入式应用中长期采用和取得成功的历史,保证了能最大程度地选取第三方硬件和软件的支持;能取得已包装的现成的软件,如堆栈和实时操作系统(RTOS);以及对各种项目都有经验丰富的工程实践和编程人员。

 

  Previous Stellarisgenerations used the original Cortex-M3 architecture.  The Thumb-2 instruction set of this earlierversion of the Cortex-M core is a high-density, power-efficient instruction setsuitable for a wide variety of general-purpose data processing and controloperations.

 以前几代的Stellaris使用最早的Cortex - M3架构。这种Cortex - M内核的早期版本,其Thumb-2指令集,是一种高密度的、高效能的指令集,适合于各种各样的通用数据处理和控制操作。

  The Cortex-M3 Thumb-2instructions include arithmetic, logical, bit, branch and data movementoperations found on many MCUs.  It alsoadds more advanced operations and multiplication, bit-field manipulation,conditional prefixes and operates on 8-, 16- and 32-bits of data. The ARMCortex-M3 has become a standard for modern 32-bit microcontrollers.

  Cortex-M3的Thumb-2指令包括了在许多MCU中都可以找到的算术、逻辑、位、转移、和数据移动操作;它也增加了更高级的操作,以及乘法、位-域操作、(附加在指令前的)条件码前缀、和在8位、16 位、及32位数据上的操作。ARM  Cortex-M3已经成为现代32位微控制器的标准。
 

  The new Cortex-M4expands the instruction offering of the Cortex-M3 by adding digital signalprocessing (DSP) extensions and single instruction, multiple data (SIMD)instructions. The Stellaris LM4Fseries also includes the floating point option (the “F” in the Cortex-M4F)across the entire offering of LM4Fproducts.

  新的Cortex-M4,通过增加数字信号处理(DSP)的扩展及单指令多数据指令(SIMD),为Cortex-M3提供了扩充指令。Stellaris LM4F系列还包括了浮点选项(在Cortex-M4F中的“F”),提供给所有LM4F产品。

  The DSP operations ofthe Stellaris LM4F seriesinclude single-cycle 32-bit or dual 16-bit multiply-accumulate (MAC)instructions and saturating arithmetic instructions.  Optimized SIMD instructions can perform four8-bit or two 16-bit arithmetic operations in a single cycle and are thereforevery effective at performing arithmetic operations on large arrays of data. Thehardware divide logic produces a result in between 2 and 12 clock cycles.  Together, these instructions add DSP-likecapability to a responsive controller core.

  StellarisLM4F系列的DSP操作,包括单周期的32位或双16位乘法累加(MAC)指令,和饱和算术指令(为了避免溢出)。优化的SIMD指令,可以在单周期中,执行4个8位,或两个16位的算术运算操作,因此在大型数组中执行算术操作非常有效。硬件除法逻辑在2~12个时钟周期内产生结果。总之,这些指令,给一个反应灵敏的控制器内核,添加了类DSP能力。

  The single precisionfloating-point instructions are compliant with the IEEE 754 standard andinclude functions such as square root and a fused MAC that enable higherprecision. Numerous data type conversions

 are available, speedingtransitions between domains.

  单精度浮点指令符合IEEE 754标准,它包括了如平方根、和融合的MAC等功能,使计算精度更高。有许多可用的数据类型变换,它们加快了域间的转换。

  Besides providing a significant performanceincrease for math-intensive operations, floating-point support greatlysimplifies the implementation and programming of floating-point routines. It isnot uncommon for a customer to spend one week developing a digital filter thenspend another month converting the filter to a fixed-point implementation toensure it is both precise and stable. This development time is not requiredwhen programmers can program their filters in the native floating-point format.

  除了数学密集型操作明显提高了性能,浮点的支持也大大简化了浮点例程的编程和执行。常常可以看到这种情况:客户花一个星期开发一个数字滤波器,再耗费一个月的时间将滤波器变换到定点实现,以同时保证精度和稳定性。然而,当程序员使用器件本身的浮点格式,来编程他们的滤波器时,就不需要花费这么多开发时间了。

 

Embracing Texas Instruments’integrated  technologies

包含了TI的各种集成技术

 

Now firmly embedded into Texas Instruments’microcontroller catalog, the new Stellaris microcontrollers have taken fulladvantage of the advances and technologies that TI has honed toexcellence. 

现在, 新的Stellaris微控制器,已经把TI的久经磨练的先进技术和工艺的全部优点,牢牢嵌入到TI的微控制器系列产品中。

  In some cases, like themixed-signal circuits and the memory structures, specific circuits weretargeted. On the other hand, an aggressive process technology has led to areduction in power consumption across the board. In the end, the Stellaris LM4F family of devices is an accumulation ofmany feature enhancements and technology improvements. 

  在某些情况下,像混合信号电路和内存结构,是针对特定电路的。另一方面,挑战性的工艺技术,导致了整体功耗的降低。最后,Stellaris LM4F系列的器件,是积累了许多功能增强和技术改进成果的集中表现。

 

Precision  integratedanalog   精确的集成模拟电路

In building the Stellaris LM4F microcontrollers, special effort went intodesigning high-quality, high-resolution analog-to-digital converters(ADCs).  The result is seen in theintegrated high-resolution 12-bit ADC that samples as fast as 1 MSPS, a samplerate that supports both the full resolution and accuracy of the ADCs, unlikeother MCUs that degrade the quality of the readings to achieve higher samplerates. Two of these 

converters are on-chip and can be fed from 24 independentinputs.  To enhance precision, adifferential external reference voltage can be applied to dedicated inputs.

在搭建Stellaris LM4F微控制器中,对于高质量、高分辨率的模拟--数字转换器(ADC)的设计,给予了特别的重视。于是可以看到,在集成的高分辨率12位ADC中,取样速率高达1 MSPS,而且可以以这样的速率支持ADC的全分辨率和全精度;而其他MCU,则需要降低读数的质量来达到更高的ADC采样率。芯片中有两个这样的变换器,它们可以从24个独立的输入端馈入模拟信号。为了提高精度,一个外部的差分参考电压可以施加到专用输入端。

  The ADCs can generateprocessor interrupts based on a conversion completion as well as on a match toone of eight digital comparators. Readingsfrom the ADCs can be queued, compared and averaged within the ADC.  The on-chip micro direct memory accesscontroller (μDMA) can feed ADC readings from the ADC FIFOs to RAM or anotherperipheral without waking up or distracting the ARM core. 

  ADC可以产生处理器中断;中断基于转换完成,并与8个数字比较器中的一个相匹配时产生。来自ADC的读数可以在ADC内排队、比较、和均值。芯片上的微型直接存储器存取控制器(μDMA)可以将ADC的读数,从ADC的FIFO馈送到RAM,或其它外设,而不需要唤醒或打扰ARM内核。

   

  There are also threeon-chip analog comparators that can be used with a programmable internalvoltage reference detect when an input analog signal has crossed a specificthreshold. These three analog comparators, along with the digital comparators,remove the requirement of continuously polling incoming ADC values and free upthe CPU to focus on real-time application tasks.

还有三个片上模拟比较器,可以与一个可编程的内部电压参考一起,用来检测输入的模拟信号是否已经越过一个特定的阈值。这三个模拟比较器,与数字比较器一起使用,可以免除不断轮询ADC收入值的需要,将CPU从专注于实时应用任务中解脱出来。

  Motion control is justone application that can take advantage of fast, accurate ADCs, floating-pointperformance to run more sophisticated algorithms and on-chip comparators. Themore quickly and precisely the motor driver can track the dynamics of a motorduring actual operation, the less pushback resistance the generated PWMs willencounter and the more efficient the control signals will be. Less energy willbe expended and the shaft will spin smoother and maintain speed or acceleratein spite of varying loads. The on-chip comparators can be used to check forfault conditions in the system requiring immediate response.

运动控制正是这样的一种应用,需要发挥Stellaris LM4F快速而精确的ADC和浮点性能的优点,结合片上比较器,以运行更复杂的算法;所形成的PWM使电机驱动器在实际运行中,能更加快速和精确地跟踪电机的动态过程,而很少会产生常见的回推阻力,也使控制信号更加有效;能在负载变动的情况下,以更少的能量代价,实现转轴平稳旋转或加速。片上比较器可用于检查系统故障状况,以满足快速响应的需要。

 

Reliable memory can be distinctive  与众不同的内存可靠性

It can be hard to get excited about memory. It is often simplytaken for granted. But changing to a TI 65 nm process for the Stellaris LM4F family raises the products to a new levelof reliability and integration.

通常认为,要在存储器上取得突破,往往是很困难的。然而,用于Stellaris LM4F系列的65纳米工艺,却改变了这一状况,将产品的可靠性和集成度提高到一个新水平。

  Borrowing the flashtechnology that TI developed for use in automotive products, the Stellaris LM4F MCUs have extended memory durability by anorder of magnitude beyond competition. The minimum number of times the flashmemory on these MCUs can be erased and reprogrammed is as high as 100,000cycles. For most applications, this breakthrough eliminates any concern ofwearing out the memory from re-flashing for data collection, configurationparameters or program modifications.

  借鉴TI在汽车产品中开发的闪存技术, Stellaris LM4F微控制器,以超过竞争对手一个数量级的耐久度,扩展了内存的耐用性。这些MCU的闪存擦除和再编程周期的次数,至少在100,000次以上。对于大多数应用而言,这一突破,使我们可以不必关心,由于对数据收集、配置参数、或程序修改的重新刷新,而引起的存储器的磨损。

 

More of thehigh-reliability flash is also available for customer-written code becauseStellarisWare? drivers are embedded in a small mask ROM on-chip.  All Stellaris LM4F MCUs have the StellarisWare binaries committed inon-chip ROM, including the peripheral drivers, the in-system programmingroutines, utilities such as CRC (cyclic redundancy check) algorithms, and AES(advanced encryption standard) tables. These APIs (application programming interfaces) let the programmer takefull advantage of these well-proven services, routines and tables, whileleaving all of the flash for customer and application-specific code. 

  由于StellarisWare?驱动程序嵌入在一个芯片上的掩蔽小ROM中,高可靠的闪存,对于编写用户代码,就更有用处了。所有StellarisLM4F MCU的片上ROM,都装上了二进制StellarisWare文件,包括外设驱动程序、在系统编程例程、以及诸如CRC(循环冗余校验)算法和AES(高级加密标准)表等实用程序。这些API(应用编程接口)使程序员可以充分利用这些久经考验的服务程序、例程、和表格,从而用户可以利用全部闪存来放置用户代码和特定的应用程序代码。

 

  There are many othermemory features on the MCUs, but one new memory type deserves specialattention. The new Stellaris LM4FMCUs have 2K bytes of secure, on-chip EEPROM. EEPROM is normally used to storelong-term variables that may even need to survive power outages and deadbatteries.  Since the implementation isinterrupt-enabled, the integrated memory allows for the execution of code whilewriting values to nonvolatile memory (execute-while-write). The EEPROM use isarchitected using a built-in wear-leveling technique that ensures each locationcan be modified 500,000 times. If the data was re-written 100 times a day, theEEPROM would last nearly 15 years!

  在本系列MCU中的存储器,还有许多其它的特点。有一种新的存储器类型是值得关注的。新的Stellaris LM4F MCU有一个2K字节的片上安全EEPROM。EEPROM通常用来保存长期变量,这在停电和电池失效的情况下常常是需要的。由于该EEPROM执行中断驱动,当写入时存储器就会执行代码(写入时执行)。EEPROM的使用是采用内置的磨损均衡技术构建的,以确保每一个存储位可以修改50万次。这就是说,如果每天重写数据100次,EEPROM的寿命能延续将近15年!

 

Power savings extend battery life  节电,延长了电池寿命

The power requirements for embedded systems continue to be a keydesign parameter for consideration. Many end equipments run off a battery;therefore a long battery life can set a customer’s product apart from competingsystems. Even mains-powered equipment often has limitations on the powerbudget.  As an example, many new productsnow draw their power solely from a USB cable, which is limited by the USB specificationto a maximum of 500 mA. 

嵌入式系统的功率需求,一直是列入考虑的关键设计参数。许多端设备的运行不用电池,因此设计需要长寿命电池的系统可能把自己放在一个无法与对手的系统相竞争的位置。甚至带有电源供电的设备通常也要对供电作出限制。作为一个例子,现在很多新产品只从USB电缆中取得电源,而USB规范限制了USB只能供给不超过500mA的电流。

  The first way TIachieved best-in-class power consumption, where class is defined by theStellaris family of devices, was by using a proprietary 65 nanometer (nm)process. This special 65 nm process lowers power consumption for themicrocontroller without sacrificing the high performance available from the ARMCortex-M4F core. TheStellaris LM4F family isthe only Cortex-M microcontroller family implemented on a process as advancedas 65nm. 

  TI实现最佳一流功耗的第一种方法,其中‘一流’是由Stellaris系列器件所定义,是使用65纳米(nm)工艺专利。这个用于微控制器的特殊的65纳米工艺,在不牺牲ARMCortex-M4F内核高性能的前提下,降低了功耗。Stellaris LM4F系列是Cortex-M微控制器家族中唯一采用65纳米先进工艺的Cortex-M MCU。

  Stellaris LM4F MCUs also have a number of clock and power domainsthat can be gated as needed to manage power. When the DSP or floating-point units are not needed, for example, or ifany of the peripherals will be idle, power and/or clocking to those modules canbe shut down in order to optimize power consumption. 

  StellarisLM4F微控制器还有若干时钟和电源域,当需要管理电源时可以控制它们。例如,在DSP或浮点单元是不需要时,或,任何外设空运行时, 这些模块的电源与/或 时钟,都可以被关闭,以优化功耗。

  Stellaris LM4F devices provide sleep, deep-sleep andhibernate (HIB) modes to save power when minimal functionality isrequired.  In the hibernate mode, powerto the entire chip is cut off except to the HIB block, leaving the MCU in astate where it can be brought back to life when the need arises. The HIB blockincludes a 32 kHz oscillator circuit, a supporting real-time clock (RTC)module, a battery monitor circuit and sixteen 32-bit words of backup batterySRAM. This minimalist implementation allows the power consumption to bereduced, in hibernate (HIB) mode, to as little as 1.6 μA. The Stellaris LM4F devices can be awakened from hibernationby an RTC match, from an external signal, or from a low voltage detectioncircuit. 

 当只需要最小功能时, Stellaris LM4F器件提供睡眠、深度睡眠、和休眠(HIB)模式,以节省功耗。在休眠模式下,除了Hib块,整个芯片的电源都被切断,保留状态,以便在需要时恢复并从留在MCU中的状态下启动。 HIB块包括一个32 kHz振荡器电路、一个支持实时时钟(RTC)的模块,一个电池监控电路、和16个32位的SRAM的备用电池。这个最小的实施,允许休眠(HIB)模式的功耗减少到只有1.6μA。Stellaris LM4F器件,可以由外部信号,通过RTC匹配来唤醒,或由低电压检测电路来唤醒。

  It might be minutes,hours, or even days between events that cause the device to come out ofhibernation. The longer the duration and the lower the power of the hibernationstate, the longer between recharges or replacement of batteries. 

  引起休眠被唤醒的事件间隔时间,可能是几分钟,几小时,甚至几天。持续时间越长,休眠状态的功耗就越低,再次充电或更换电池的时间就更长。

 

  Additionally, the stateof all GPIO lines can be saved during hibernation until the chip wakes up. Uponawakening, the chip goes through a power-on reset and starts executinginstructions in a maximum of 500 μS. In full 80 MHz execution mode from flash,the Stellaris LM4F devicesconsume a typical 30 mA. A full description of the power modes is shown inFigure 2.

  此外,在休眠状态时,所有GPIO线路状态都能被保存,直到芯片被唤醒。在唤醒过程中,芯片经过一个上电复位,并在最多500微秒内执行指令以完成启动过程。在80 MHz的闪存全执行模式中, Stellaris LM4F器件消耗通常是30 mA。图2全面介绍了各种电源模式。

 

Fig. 2 - A full description ofthe power modes available on Stellaris LM4F devices

#Specs provided are nominal,running from flash, * Preliminary, subject to change

图2 - Stellaris LM4F器件各种功率模式的全面介绍
#所提供的规范是标称值,自闪存中运行

*予定值,有待变更

 

Stellaris Cortex-M microcontrollers: The right devices for yourapplication    StellarisCortex-M系列微控制器:是您应用的正确选择

With over 230 Stellaris ARM Cortex-M3 microcontrollers inproduction today, the Stellaris MCU portfolio provides one of the broadestofferings of ARM Cortex-M microcontrollers in the marketplace. The 40 StellarisLM4F devices announced in 2011are only the beginning of a much broader family of Cortex-M4F implementations.

今天已经生产了超过230种StellarisARM Cortex-M3微控制器,投放在市场上的Stellaris MCU 组合包,是使用最广泛的ARM Cortex-M系列微控制器中的一种。在2011年宣布40种Stellaris LM4F器件,只是更广泛的Cortex-M4F家族实现中的开始。

  A few key points fromthe Stellaris LM4F familyhave been highlighted: floating-point performance, the integrated analog, theintegrated memory, and the low-power consumption. Many of these advantages comeas a result of either integrating the new ARM Cortex-M4F core, leveraging the TI analog design expertise, oras a result from using TI’s differentiated 65nm process technology.

  根据Stellaris LM4F系列的几个关键方面,已经强调了:浮点性能、集成的模拟电路、集成的存储器、以及很低的功耗。这些优势中的许多都是来自于集成新的ARM Cortex-M4F内核、充分利用TI模拟设计方面的专业知识的结果,或者来自于TI特有的65nm工艺技术??的结果。

  For the future,customers can expect a roadmap that leads to higher integration, moreperformance, and even lower power. To evaluate the current LM4F devices, Texas Instruments offers theStellaris EK-LM4F232 evaluationkit, priced at $149 USD, which includes all the hardware and software to getstarted in 10 minutes of less. This includes a demo of a data loggingapplication that highlights the integrated 12-bit analog-to-digital converters(ADCs), power consumption, USB and the high-reliability flash.

  对于未来,顾客可以预期的一个路线图是,更高的集成度、更强的性能、和更低的功耗。为了评估当前的LM4F器件,TI提供了Stellaris EK-LM4F232评估套件,售价为$ 149,其中包括所有的硬件和软件,能在10分钟以内就可以启动。套件中包含了一个数据记录应用程序,着重在突出集成的12位A/D转换器(ADC)、功率消耗、USB、和高可靠性闪存等的演示。

 

Find out more about Stellaris LM4F MCUs, tools and software:

寻找更多关于StellarisLM4F系列的微控制器、工具、和软件:

 

Stellaris Cortex-M4Fmicrocontrollers: ti.com/cortexm4f

Stellaris Cortex - M4F微控制器:ti.com/cortexm4f

Order your EK-LM4F232evaluation kit: ti.com/ek-lm4f232

订购您的EK- LM4F232评估板:ti.com/ek-lm4f232

Video overview of Stellaris LM4F microcontrollers: www.ti.com/cortexm4-v

视频介绍Stellaris LM4F微控制器:www.ti.com/cortexm4-v

 

Make the Switch to Texas Instruments MCUs:www.ti.com/make-the-switch

切换到TI MCU 网页:www.ti.com/make-the-switch

 

 

2011 Texas Instruments Incorporated