Tag Archives: 32-bit microcontroller

8- or 32-bit, that is the question…

Writing for Electronic DesignAtmel’s Ingar Fredriksen and Paal Kastnes recently explored the latest market trends for both 8- and 32-bit microcontrollers (MCUs). While the 32-bit MCU devices continue to rise in popularity throughout the embedded community, 8-bit MCUs are still experiencing a CAGR close to that of their bigger cousins.

These 32-bit, function-rich devices suit an array of different applications, which explains why many embedded developers select them for their next designs. Designers recognize that such complex devices offer everything they need in terms of raw compute power, a rich peripheral set, and easy access to a wide range of development tools and libraries.

Many of these 32-bit devices — which are members of the Atmel | SMART family — are based on the highly-successful ARM cores. Thus, developers feel confident in having access to second source devices and a comprehensive set of development, test and validation tools being available in the market.

However, taking a closer look at recent MCU market trends has revealed that 32-bit devices aren’t the only ones experiencing strong growth. The surging 8-bit MCU market boasts a CAGR (6.4%) close to that of 32-bit (6.9%). Meanwhile, a number of other industry analysts forecast identical growth rates for 8- and 32-bit microcontrollers.

The upswing in 8-bit devices, like the incredibly popular Atmel AVR lineup, clearly highlights that there must be some compelling reasons to use an 8-bit device in place of a 32-bit MCU. The recently-published Electronic Design article looks to shed some insight as to why 8-bit devices are retaining market share.

Essential Differences

The principle differences between 8- and 32-bit MCUs are cost and price structure, CPU performance, ease of use, efficiency in hardware near functions, and static power consumption. When embarking on a new design, developers need to carefully scope out the requirements for an MCU based on the amount of processing capability required, the degree of interfacing needed, and, for battery-powered designs, the all-important power consumption profiles. There’s no doubt that a 32-bit MCU delivers higher performance than an 8-bit device, but the engineer faces the traditional decision of choosing between the best available device in the market versus an application’s actual needs.

Table-1-big

Of course, these decisions will greatly influence the likely bill of materials (BOM) cost. With a lower gate count, a less complex 8-bit device will certainly be cheaper than a 32-bit device. When comparing 8- and 32-bit MCUs from leading vendors, each with a similar amount of flash memory, pin-out etc., 8-bit devices typically cost about 20% less. But this is only the first of many considerations. Another aspect relates to the ease in setting up for a new development.

Ease of Development

MCU suppliers tend to add more features and functionality to their 32-bit devices as opposed to 8-bit products. Consequently, far more setup considerations emerge with a more complex device. While some 32-bit MCUs can run with a limited setup similar to that of an 8-bit device, you’re unable to take advantage of the more powerful device’s additional features.

For example, a typical 32-bit ARM device will have independent clock settings for the core itself, the AHB bus, the APBA bus, and the APBB bus. They all can be set to different frequencies. Typically, you will also have to switch to the clock you want to use because it’s set in software, not in hardware like most 8-bit parts. Furthermore, changing the clock means you must set up the wait states for flash, possibly predicated on measured VCCvoltage.

Such a setup can be much simpler with an 8-bit MCU, though. For example, Atmel’stinyAVR and megaAVR products only require initialization of the stack pointer, which typically takes four lines of code, prior to coding the application. The choice of clock, brownout detector, reset pin function, etc., is all pre-programmed into the device.

The architecture is also much more straightforward than a 32-bit device with internal registers, peripherals, and SRAM all mapped on the same data bus. The peripherals and CPU would normally run at the same frequency, so no peripheral bus configuration is necessary. Moreover, designers can avoid being concerned about latency in synchronizing between different clock domains.

Performance

When it comes to desired CPU performance, the engineer should consider all use cases. The reality is that many embedded designs don’t have high compute requirements. Often, very little manipulation of data is required, so balancing those needs against power-consumption and peripheral-interfacing requirements becomes crucial.

For instance, a simple thermostat application will spend most of its life in a sleep mode. Every so often, it will wake up and measure the temperature and then make a decision to turn a relay on/off or send an instruction to a host controller. Then it will resume sleep. The compute and interface requirements of this application are small, but many other applications such as fire detectors, power tools, flow meters, and appliance controls have a similar use profile, too.

Efficiency of Hardware Near Functions

Many modern microcontrollers incorporate some hardware functions that serve to help the CPU operate as efficiently as possible. In Atmel’s case, both the 8-bit AVR and 32-bit ARM-based MCU families feature the Peripheral Event System. An event system is a set of hardware-based features that allows peripherals to interact without intervention from the CPU. It allows peripherals to send signals directly to other peripherals, ensuring a short and 100% predictable response time.

When fully using the capabilities of the event system, the chip can be configured to do complex operations with very little intervention from the CPU, saving both valuable program memory and execution time. In the case of detecting a hardware event, it’s important to first detect the event and then switch control to the desired interrupt service routine (ISR).

In these situations, CPU speed isn’t the single determining factor. It’s a question of how long, in terms of cycles, does it take to respond to the interrupt, run the ISR, and return. As the following example will show, 8-bit devices can be more efficient in handling hardware near actions.

Table-2-big

Consider receiving one byte on the SPI, using an interrupt to detect it, and then running a simple ISR routine to read the byte from the SPI peripheral and store it in SRAM. Using this scenario, table above draws comparisons between an Atmel 8-bit AVR device and an Atmel ARM Cortex M0+based 32-bit MCU. Calculated with information available, the results are based on minimum implementations. However, engineers should check with their own applications since the interrupt detection and return from interrupt could take more cycles than shown in the table. Requiring 12 cycles versus 33 cycles equates to having a theoretical maximum SPI bandwidth of 1.67 MB/s for the 8-bit CPU and a 606 kB/s bandwidth for a 32-bit CPU when running at 20 MHz.

The degree of numeric processing can also have an impact on the stack and required memory. Applying the Fibonacci algorithm is one particularly good method for testing memory requirements. Since it only uses a local variable, everything needs to be pushed to the stack.

When making a comparison between an 8-bit AVR and an ARM 32-bit CM0+-based device, and using a recursive 15-stage Fibonacci algorithm, the AVR uses a total of 70 bytes of stack, including 30 for return stack (15 calls deep). The ARM-based device uses 192 bytes (60 should be return stack). This means the CSTACK is more than three times the size of the 8-bit solution. In typical C code, more of the variables on the stack often come in a packed format, so this is an extreme corner. However, saying 1.5 to 3 times more SRAM is needed for the same 8-bit-centric application on a 32-bit (versus a native 8-bit) device is a fair estimation.

Power Consumption

No MCU article would be complete without investigating static power consumption. This alone may be a key factor in choosing between an 8- or 32-bit device, especially for battery-powered applications. The table below illustrates power-consumption differences between 8- and 32-bit devices in both active and static modes.

Table-3-big

Aggressive manufacturing technologies increase transistor leakage current, which roughly doubles with each process generation, and is proportional to the number of gates. Leakage current increases exponentially at higher temperatures, which can be easily overlooked when designing a consumer design. Mobile phones and personal media players are transported everywhere, and as we have all found out, temperatures experienced during the summer inside a car can easily climb above 40°C.

The amount of time the microcontroller will spend in active mode versus static mode contributes significantly to the overall application power budget.

Naturally, the ratio between active and static modes will vary depending on the application requirements. Taking the previous SPI interrupt example (second table from above) and assuming a SPI data bandwidth of 80 kb/s, the 8-bit CPU will spend 1.2% of its time in active mode compared to that of the 32-bit, which will spend 3.3% in active mode (table below).

Table-4

Conclusion

Contemplating whether to use an 8- or 32-bit microcontroller for a future design may involve an Internet of things (IoT) application. How IoT actually takes shape provokes lots of debate, but it will certainly challenge engineers to make a detailed appraisal of the MCU requirement. Wireless connectivity, especially ZigBee, will also be an essential component, but that doesn’t automatically mean that it will need a higher power device.

A number of available 8-bit microcontroller products satisfy the need for low levels of processing and wireless connectivity. One such example is the Atmel ATmegaRFR2 series, which provides an IEEE 802.15.4-compliant, single-chip, 2.4-GHz wireless microcontroller solution that suits battery-powered, low-cost IoT designs.

Interested in reading more? Be sure to check out the original article from Electronic Design here.

Low power just got lower with the Atmel | SMART SAM L21

Well, low power just got lower. The Atmel team is excited to announce that it has reached a new low-power standard for its ARM Cortex-M0+ based MCUs with power consumption down to 40 µA/MHz in active mode and 200nA in sleep mode. In addition to ultra-low power, the new platform features full-speed USB host and device, Event System and Sleepwalking,12-bit analog, AES, capacitive touch sensing and much more.

IMG_5037

With billions of devices predicted for the Internet of Things (IoT) market by 2020, there is a need for lower power MCUs that will power these applications without adding load to utility grids or requiring frequent battery changes. Atmel’s latest Atmel | SMART platform is designed specifically for these applications, expanding battery life from years to decades.

Consuming just one-third the power of comparable products in the market today, the new low-power SAM L21 family is the first on the new platform expanding the Atmel | SMART 32-bit ARM-based products using Atmel’s proprietary picoPower technology.

While running the EEMBC CoreMark benchmark, Atmel’s SAM L21 family delivers ultra-low power running down to 40µA/MHz in active mode, consuming less than 900nA with full 32kB RAM retention and real-time clock and calendar, and 200nA in the deepest sleep mode. With rapid wake-up times, Event System, Sleepwalking and the innovative picoPower peripherals, the SAM L21 ultra-low power family is ideal for handheld and battery-operated devices in a variety of markets including IoT, consumer, industrial and portable medical applications.

Architectural innovations in the new platform enables low-power peripherals including timers, serial communications and capacitive touch sensing to remain powered and running while the rest of the system is in a lower power mode, further reducing power consumption for many always-on applications.

SMRA

The Atmel SAM L21 family has amazingly low current consumption ratings for both the active and sleep mode operation which will be a great benefit in targeting the growing battery-powered device market,” said Markus Levy, president and co-founder, EEMBC. “With billions of devices to be brought to market during the era of the Internet of Things, designers can utilize Atmel’s ultra-low power SAM L family to ensure an increased life in these battery-powered devices. To instantiate this power data from Atmel, I’m looking forward to seeing the results from this new platform running our newly established ULPBench, aimed at the ultra-low power microcontroller industry.”

“Atmel is committed to providing the industry’s lowest power technologies for the rapidly growing IoT market and beyond for battery-powered devices,” expained Reza Kazerounian, Atmel SVP and GM, MCU business unit. “Developers for IoT edge nodes are no longer just interested in expanding the life of a battery to one year, but are looking for technologies that will increase the life of a battery to a decade or longer. Doing just that, the new 32-bit MCU platform in the Atmel | SMART family integrating our proprietary picoPower technologies are the perfect MCUs for IoT edge nodes.”

Engineering samples of the SAM L21, along with development tools and datasheet will be available in February 2015. Meanwhile, the SAM L21 can be found all this week in Hall A5, Booth 542 at Electronica.

Atmel introduces next-gen SoC solution for smart metering

Atmel recently announced the introduction of its latest Power Line Communication System-on-Chip (SoC) solution designed for smart metering applications.

SmartEnergy_Update_Category_728x280_080514

The Atmel SAM4CP16B is an extension of Atmel’s SAM4Cx smart energy platform built on a dual-core 32-bit ARM® Cortex®-M4 architecture. Fully compatible with Atmel’s ATPL230A OFDM physical layer (PHY) device compliant with PRIME standard specification, this highly flexible solution addresses OEM’s requirements for various system partitioning, BOM reduction and time-to-market requirements by incorporating independent application, protocol stack and physical layer processing functions within the same device.

Atmel-smart

“We continue to build on the success of our industry leading SAM4Cx platform and offer best-in-class embedded connectivity, flexibility and cost structure for high-volume smart metering deployments,” said Andres Munoz, Atmel Marketing Manager, Smart Energy Communications. “Furthermore, additional enhancements developed to meet PRIME standard specifications provide unprecedented performance in rigorous environments.”

atmel_SMART_HomePage_980x352

As part of the Atmel® | SMART™ family, the solution includes integrated low-power driver, advanced cryptography, 1Mbytes of embedded Flash, 152Kbytes of SRAM, low-power RTC, and LCD controller. Additional key features include:

  • Application/Master Core
    — ARM Cortex-M4 running at up to 120 MHz
    — Memory Protection Unit (MPU)
    — DSP Instruction
    — Thumb®-2 instruction set
    — Instruction and Data Cache Controller with 2 Kbytes Cache Memory
  • Co-processor
    — ARM Cortex-M4F running at up to 120 MHz
    — IEEE® 754 Compliant, Single precision Floating-Point Unit (FPU)
    — DSP Instruction
    — Thumb-2 instruction set
    — Instruction and Data Cache Controller with 2 Kbytes Cache Memory
  • Symmetrical/Asynchronous Dual Core Architecture
    — Interrupt-based Interprocessor Communication
    — Asynchronous Clocking
    — One Interrupt Controller (NVIC) for each core
    — Each Peripheral IRQ routed to each NVIC Input
  • Cryptography
    — High-performance AES 128 to 256 with various modes (GCM, CBC, ECB, CFB, CBC-MAC, CTR)
    — TRNG (up to 38 Mbit/s stream, with tested Diehard and FIPS)
    — Classical Public Key Crypto accelerator and associated ROM library for RSA, ECC, DSA, ECDSA
    — Integrity Check Module (ICM) based on Secure Hash Algorithm (SHA1, SHA224, SHA256), DMA assisted
  • Safety
    — 4 Physical Anti-tamper Detection I/O with Time Stamping and Immediate Clear of General Backup Registers
    — Security bit for Device Protection from JTAG accesses
  • PRIME PLC embedded modem
    — Power Line Carrier Modem for 50 Hz and 60 Hz mains
    — 97-carriers OFDM PRIME compliant
    — DBPSK, DQPSK, D8PSK modulation schemes available
    — Additional enhanced modes available: DBPSK Robust, DQPSK Robust
    — Eight selectable channels between 42kHz to 472kHz available
    — Baud rate Selectable: 5.4 to 128.6 kbps
    — Four dedicated buffers for transmission/reception
    — Up to 124.6 dBμVrms injected signal against PRIME load
    — Up to 79.6 dB of dynamic range in PRIME networks
    — Automatic Gain Control and continuous amplitude tracking in signal reception
    — Class D switching power amplifier control
  • Shared System Controller
    — Power Supply
    — Embedded Core and LCD Voltage Regulator for single supply operation
    — Power-on-Reset (POR), Brownout Detector (BOD) and Watchdog for safe operation
    —Low Power Sleep and Backup modes

Interested in learning more about Atmel’s new comprehensive smart energy platform? You can check out our recent deep dive on the subject here.

Powering Down 32-Bit MCUs

32-bit microcontrollers are getting designed into pretty much every electronic product. Until recently they were used primarily in industrial and automotive applications, but with improved architectures leading to significantly lower power consumption, MCUs are now being adopted in a broad range of portable and battery-powered applications. The folks at Atmel have introduced a new, ultra low power family of ARM® Cortex™-M4 processor-based MCUs that consume just one-third the power of currently available solutions. Various sleep modes that enable the MCU to shut down unused modules along with software-controlled clock gating are used to tailor the power consumption based on the application’s requirement. In addition, unused peripherals can also be fully shut down individually and enabled again during runtime, further lowering power consumption without compromising system operation. Learn more about SAM4L devices.