Memory usage in M2M environments

By Marina Mariano
Numonyx Software Engineer

Machine to Machine (M2M) is a new development in telecommunication environments where a communication device (modem) is connected directly to a network without user interface or interaction. The possibilities opened by this protocol apply to a wide variety of enterprise applications, growing in importance as markets expand. This article covers specific environmental conditions and use cases that have a direct impact on flash memory requirements. It also discusses the hardware/software solutions that address this impact.

M2M devices offer solutions for a variety of use cases

There are a wide variety of M2M applications that address the diverse scenarios where remote communication can add value.

In the automotive sector, a modem could be installed in an automobile to provide an anti-theft device that alerts the owner of unauthorized movement and provides alarm integration with a remote unlock feature. An M2M device could also be used for personal safety to detect excessive speeds, send a notification when an accident occurs or alert the driver of danger. It could also provide remote car diagnostic, sending the vehicle’s owner a remote maintenance notification along with the location of the nearest service station.

An M2M device could also be used for utility meter monitoring (such as water, electricity and gas). For example, a gas meter could contain an M2M modem that transmits information about gas consumption. This information could be used to help avoid gas consumption during idle times, or prevent unauthorized use. In addition, utilities could be prepaid so that a real-time measurement of energy consumption can be monitored.

Additional services are based on technologies that allow M2M devices to communicate with other devices in a short or medium range, making the M2M device act as a gateway to a personal area network (PAN) of connected devices. For example, Near Field Communication (NFC) allows the creation of a point-to-point connection between an M2M device and low-cost radio-frequency identification (RFID) tags that can then be accessed by network connectivity. This could be implemented in a vending machine that is able to control the amount of available goods, report information to a remote controlling system, and request authorization from a remote controlling system for mobile NFC-based payments.

Because M2M services are so varied, their deployment requires the use of applications on the hosting device that are able to handle information and M2M communication and provide a secure communication channel for applications that deal with financial transactions, such as a point-of sale (POS) terminal.

Most M2M services also require a connection to remote servers, adding new models for M2M business. This creates a need for new families of network elements (router, gateway, etc.) that are suitable for M2M applications in order to manage data communication and security. With these elements in place, a user can connect to remote services to access information gathered by M2M devices. For example, a user could access data regarding their electrical consumption, which was collected by an M2M metering system.
 

Figure 1. Each M2M module hosts an input/output unit, which provides a connection to remote services and user applications. M2M applications interact with M2M devices to access connection services, store data and interact with M2M device applications. Typically, this requires that the M2M device be provided with an operating system and file system management.

 
Figure 2. In complex environments, M2M devices are standalone devices equipped with a specific interface (for example, USB), volatile and non-volatile memory stack, applications, operating system and device drivers. Typically, M2M devices use read-only memory (ROM) for code storage and EEPROM for both code and non-volatile memory storage.

An M2M solution includes the hardware, hosted software and services necessary to easily develop applications. It also includes wired and wireless communication devices, modules and adapters. In addition, an M2M solution provides management, messaging and storage services that connect remote assets, enterprise applications, and much more.

M2M technology landscape

The use cases described in this article greatly expand the markets for telecommunication equipment (SIM, modem, etc.). Also, M2M devices and wireless infrastructure are changing to collect and distribute information and meet the design challenges associated with managing system resources and user applications, such as remote connectivity and data security.

Application models, protocols and interfaces have begun to be unified to avoid fragmentation, and some systems have been created to reduce technological issues across M2M systems. This can be seen as an attempt to standardize the M2M protocol by introducing open communication protocols. This trend is similar to a trend with memory interfaces that requires models that are as hardware independent as possible.

In addition, reliability is a key factor in M2M systems as they are often critical for safety (such as in automobiles), or simply because they could be deployed in a wide environment and replacement can be expensive. For example, a defect in a metering system could result in a replacement on every meter in a country.

These scenarios add new requirements for reliability and standardization, even for the memory devices that are part of M2M devices. Standardization institutes have committed to address the M2M business. At the European Telecommunications Standards Institute (ETSI), a dedicated group has been established to define standards and requirements for several M2M devices. For example, the ETSI TS 102 412 Release 9 defines requirements for an M2M SIM.

M2M’s reliability requirements imply technological issues due the variety of machines and protocols. In addition, because the majority of M2M communication is wireless, M2M devices suffer from channel coverage and connection failure management, requiring policies for channel management and for switching to backup channels. In addition, the large number of devices involved in communication requires a means to handle a large number of connections, data and network floods. Plus, remote device management requires connection between many applications that manage many remote devices, each equipped with their own applications and communication protocols.

M2M applications require scalable solutions that can be customized on demand and the standardization of interfaces used by customers to develop and configure applications. Applications can vary from a complex web server with networking applications to simple monitoring applications.

The role of legacy flash memory and Phase Change Memory (PCM) in M2M use cases

The M2M use cases described in this article illustrate the need for device longevity and reliability requirements that are not common for other embedded systems. Those requirements have an impact on the hardware in terms of durability. They also have an impact on memory handling due to the constraints of non-volatile memory.

To reduce time and complexity in development efforts, it is crucial that the operating system and applications can be relieved of handling those specific constraints by relying on memory devices that ensure device longevity to satisfy even the most demanding M2M scenarios.

sing high-quality memory allows application developers to focus on applicable use cases and business logic. M2M solution providers can then focus on creating new services. However, this requires that the memory model ensures that applications are easy to maintain, and this can be granted only by offering the same interfaces and architecture to all services. When based on a hardware-independent memory model, it is required that other applications can be easily added and ported without modifying the customer’s infrastructure.

Other requirements come from existing business environments where M2M devices will be used. For example, the automotive industry requires data retention of at least 15 years and a number of Read/Write cycles greater than 500,000. These requirements for high reliability and long data retention are typically met by EEPROM-based memory devices. However, using specific software layers that interact with the memory, it is possible to meet the same requirements with flash technology, allowing flash memory devices to participate in this huge new market.

At first glance, the introduction of flash memory faces physical constraints that do not match market requirements. Current flash technologies typically guarantee 10 years of data retention, apparently missing the automotive industry’s typical 15-year data retention requirements. However, this limitation can be easily solved by offering specific mechanisms that extend the lifespan of the memory and improve the number of Read/Write cycles.

These issues require that a common mechanism (referred to as a Memory Data Manager (MDM) in this article) be introduced in the flash management for handling the M2M requirements. An MDM can be realized by a set of hardware/firmware mechanisms that offer a common interface to application developers and meet reliability requirements.

The new requirements related to M2M applications (referred to as data retention in this article) result in a need to increase the typical data retention period of about 10 years, after which, the information held in flash can lose coherency and become unreliable. Extending the period of data retention can be achieved by moving and rewriting data on the flash memory device, as the writing operation enforces the electrical charge that stores the information and restores it to the maximum levels, hence refreshing the information stored on the device. This operation is particularly critical for memory areas that are not considered to be data areas by the operating system. Data areas are typically updated on a regular basis by normal operations.

Flash memory also contains other information, such as boot blocks, the operating system blocks where code is actually stored and blocks reserved for code extensions. The data in these blocks must be moved periodically. Occasionally, moving operating system components is not allowed or the system was not designed to rewrite the operating system components in order to refresh them. An MDM can handle this limitation and can be designed to periodically refresh during idle times any memory cells that are identified as losing their coherency.

In data blocks, data retention is typically not an issue because data blocks are updated on a regular basis by M2M applications. Also, data blocks and the blocks dedicated to storing metadata information are subject to heavy erase/write cycling. This challenges the flash device’s limitation on the maximum number of erases for each block. An MDM can solve the issue by Wear Leveling the data written into the flash memory device. Wear Leveling extends the lifespan of a flash memory device by evenly distributing writes across all blocks in the device. This minimizes the erase count for each block and ensures that no single block fails prematurely due to a high concentration of erase/write cycles.

In addition, Power Loss Recovery (PLR) can be handled by low-level block management when reliability and robustness are required. Typically, writing data to a flash memory device requires a previous erase operation in a block. If power loss occurs after an erase operation, the data within the block is lost, even when the software only needs to update one subset of the block. However, before an erase/write cycle, an MDM can back up data to a safe area to allow recovery when a power loss event occurs unexpectedly.

Because the MDM is close to the hardware, it maximizes hardware performance by tailoring mechanisms for faster operations. For example, erase operations can be scheduled as low-priority operations as the logical addressing system and Wear Leveling allow the MDM to manipulate logical blocks to minimize the number of erase operations that are required.

An MDM has an additional advantage of being a common interface that is independent of the hardware. This allows the flexibility to move between different memory technologies without impacting the applications that rely on the MDM. A notable example of the need to move between different memory technologies is the introduction of Phase Change Memory (PCM), which offers 1 million Read/Write cycles and low write granularity. Numonyx is a leader in developing and deploying this new memory technology. As PCM is introduced to the market, it will be used in M2M applications. The introduction of PCM impacts only the MDM layer, which minimizes the porting time for existing applications.

The value that PCM adds to M2M applications is not limited to the extension of Read/Write cycles. It also offers lower power consumption, which is required by some M2M applications. In some applications, M2M devices are small, require longevity and are not connected to the power supply. This means that power consumption becomes even more critical than in traditional telecommunications. Also, PCM has the advantage of being bit-alterable, meaning that the cells in PCM can be programmed from a “1” to a “0” or “0” to “1” without the need for a separate erase step. This ensures that data is not lost when power loss occurs unexpectedly.

PCM supports code that is eXecuted in Place (XiP) and can be used to efficiently store an operating system and application code as there is no need for an intermediate copy to RAM. In addition, PCM’s data retention is much longer than NAND flash memory and is comparable to the best performance of NOR flash memory.

Conclusion

Adding transparent flash memory management to M2M embedded and wireless designs ensures compliance with the requirements of the M2M standard. It also maximizes memory performance, reduces costs, streamlines development and speeds design time. By introducing the MDM model, flash memory can meet and exceed EEPROM reliability and retention features. Flash memory also provides additional benefits that are more easily managed and updated by device makers.

The unified interface speeds integration by minimizing system complexity and reducing time-to-market for innovative M2M solutions. These standard features ensure that existing designs can continue running as soon as possible, allowing a faster development and maintenance model for M2M services.

Numonyx offers a wide range of flash memory solutions based on NOR and NAND memory devices integrated with software solutions. Numonyx is also leading the development of the innovative Phase Change Memory (PCM) technology. For more information, contact your Numonyx representative.