NVM is used in most embedded systems, but with different memory types available which is best to use and why? Michael Barrett, Managing Director of Nexus Industrial Memory, provides a brief refresher course and touches on removable NVM devices.

Many factors will govern your choice of non-volatile memory (NVM) technology. These include storage capacity, the speed with which data needs to be written/read/erased, security, power consumption, voltage range and, of course, cost.


There are five main forms of NVM:

  1. Read only memory (ROM). A common type of this is ‘mask ROM’, which is programmed at the point of manufacture; after which erasure is not possible. In this respect, ROM is one time programmable (OTP). It is secure in terms of the data being unalterable, but the end application needs to be high volume to justify the ROM production cost.
  2. Programmable read only memory (PROM) is also OTP. Data is written electrically, after which erasure is not possible. It is ideal for medium to high volume applications, and ‘blank’ PROMs can of course be purchased in high volumes to take advantage of the economy of scale.
  3. Erasable programmable read only memory (EPROM). Data is written electrically after which the device cannot be written to again unless the entire chip (the package of which has a window) is erased using UV light.
  4. EEPROM (sometime E2PROM). Data is written, read or erased electrically at the byte level.
  5. Technically, this is a form of EEPROM. It is just architecturally different. For NOR Flash read/writes are at the byte level. For NAND Flash, read/writes are at the page level. Erasure (for NOR and NAND) is performed at the block level.

ROM and PROM are ideal for applications for which there is no need for data to change in the field. EPROM tends to be used for system development and prototyping purposes, before switching to ROM or PROM for volume production.

EEPROM and Flash are ideal for applications where the data will change frequently. The architectural differences though create a trade-off between speed and longevity. Flash’s block-level erasure is quicker than EEPROM’s byte approach, but it can accommodate fewer re-write cycles (up to circa 10K for Flash versus up to 1M for EEPROM).

Another differentiator is that Flash offers greater storage capacity than EEPROM. This makes Flash ideal for applications that require high speed access to a high volume of data that won’t necessarily be changing that often (i.e. semi-static). EEPROM is better suited to embedded systems requiring higher frequency read/writes of lower volumes of data and which may need to provide several years of service in the field.

Communication with an NVM is via either serial or parallel comms protocol. Serial is favoured in most embedded systems because of the lower power consumption (circa one tenth, in the case of EEPROM, for example). Also, there are fewer I/O pins/pads and, because of that, a smaller device outline.

Removable NVM Devices

Another consideration is just how embedded does your embedded memory need to be? Many systems require the use removable memory devices for applications that include system configuration and data monitoring.

Commercial USB thumb drives are used in many applications and PCB-mounted receptacles are not expensive. The port can also be used for interfacing via a USB lead, an advantage but also a security concern. However, commercial devices nor their receptacles are really cut out for harsh environments.

Industrial alternatives are available that are essentially USB silicon inside a rugged enclosure, so system software can be developed as if for standard USB. However, the enclosure is virtually crush proof, can withstand heat extremes and immersion in fluids. Also, the mechanical interconnect is different from USB, which adds a layer of security as devices cannot be interrogated without a corresponding receptacle.

If security is a concern – which it will be if the devices are to be used for user authentication and/or the transfer of small volumes of sensitive data (e.g. system confirmation settings) – devices are available on the market that incorporate Microchip’s CryptoAuthentication silicon. It is extremely secure. Features of the silicon include unique serial number and non-interchangeable 72-bit serial number (set by Microchip), a 512-bit (OTP) zone, a SHA-256 hash algorithm for data encryption. The data is secure and device cloning is virtually impossible.

Another NVM technology worth mentioning is write-once read-many (WORM). It prevents sensitive files from being altered, deleted or overwritten. The physical form factor is typically SD or microSD card (see figure 2) because the technology first proved popular for use with commercial products (laptops, cameras etc), used by people requiring a permanent record of data. For example, security forces and legal professionals are using WORM cards as an alternative to burning CDRs and DVDRs, which are becoming obsolete.

With capacities of 256GB available, WORM is set to become a popular NVM technology within high security embedded systems.

Removable memory devices are used for many applications in the industrial sector. These include the storage and transfer of files, the implementation of software / firmware updates, and for user authentication and controlling access privileges.

The USB drive (memory stick) is the most common form factor; being low-cost, widely available and easy to use. But these conveniences come at a price. There are considerable security concerns around the use of USB sticks. One of these is targeted data theft, and it has been reported in many places how hackers are writing executable programs and placing them on memory drives.

These drives are then left at venues frequented by the employees of the [targeted] company. The program executes automatically as soon as the drive is plugged into a computer. Its purpose: to transfer another program residing on the drive to the computer. That second program will give the hacker remote access to the company’s network and, by extension, commercially sensitive data and any IP that exists as software (including programs for controlling drives and automation equipment).

This form of cyber-attack (the first move of which was within the company’s firewall) could go undetected for a long time.

Locked Out

Another concern is a cyber-attack through ransomware. Increasingly favoured by cyber-criminals, ransomware prevents users from accessing their files by encrypting them. A key is needed to decrypt the files and sometimes each file is given a unique key, meaning that correctly guessing a key would only unlock one file. Moreover, the malware can lie dormant for a period so that it gets backed up.

The cyber-criminals then request payment in the cryptocurrency Bitcoins, online vouchers or via other methods that provide a high degree of anonymity; this under the practice known as ransomware-as-a-service (RaaS). There is no guarantee that files will be decrypted though, i.e. perpetual blackmail, or you may be asked to make a further payment to remain safe in the future, i.e. a cyber protection racket.

Along with falling foul of phishing emails, visiting a compromised [trusted] website and downloading files and remote desktop access (e.g. someone phones you and talks you through fixing a problem that’s allegedly been detected on your PC), ransomware can also make its way on to your PC via memory stick. Indeed, some malware is tailored for transfer specifically by USB stick; a case in point being the ‘USB Thief’ trojan that collects personal data and made the news a few years ago.

An even more malicious attack – again designed for USB drives – is one that hunts a network for specific hardware and controller software with the aim of shutting it down and/or driving it in such a way to cause an accident.

The one to mention here is of course Stuxnet, which was effectively a weapon. Spreading through PCs running Windows, Stuxnet hunted for Siemens Step 7 software, which runs on programmable logic controllers (PLCs). The malware provides instructions to the PLCs that will cause damage to hardware and it is believed that power stations were a target, with many of Iran’s nuclear centrifuges damaged in 2010. Though Stuxnet is history, its source code has since appeared in other malware.

Data theft programs, ransomware and digital weapons are just some of the dangerous code that can reside on a USB stick. Also, though we think we live in an increasingly cyber-aware world – and most of us simply would not plug a USB stick we found into a computer – the reality is somewhat more disturbing.

For instance, in 2016 Google and two universities in the US conducted a study. They left almost 300 USB sticks infected with a harmless trojan around the universities’ campuses. Almost half were picked up and plugged into PCs, at which point the trojans reported in. Of these, only a few were scanned for viruses first. Those looking on the devices were allegedly doing so to see if any of the content would identify the rightful owner. Good Samaritan. Bad consequences. It only takes the careless actions of one person to breach a network.

Go Industrial

It is the popularity and availability of devices like USB sticks that make them ideal carriers for malware. On another note, any system with a USB port on its front panel, elsewhere on its enclosure or even inside is vulnerable to attack because data can be stolen, or malware introduced, using a portable computing device and a USB lead.

Accordingly, many industries have banned the use of USB drives. However, such bans need policing/enforcing and some companies have made the possession of a USB drive on company property a sackable offence. Other companies have added physical security devices such as locks to the USB ports of their systems; a practice which also requires policing as there will always be the danger of a platform with unlocked ports being left unattended. Again, it takes just a single infringement to compromise the entire network.

However, as it is the popularity of the USB form factor (for drives and ports) that is the weak link in security. If your operations rely on the use of removable memory devices, the best solution is to ‘go industrial’.

Industrial removable memory devices are available that have Flash memory inside and communication is via the USB protocol. Mechanically they are incompatible with USB so if a drive containing sensitive information were to be lost or stolen it is extremely unlikely the finder would have a receptacle with which to interface with the device. For instance, had industrial removable memory devices, such as Datakey keys or tokens (see figure 1), been left lying around as part of the study on the university campuses, the individuals picking them up would have been unable to access the content – content which would not have been able to escape.

Similarly, anyone wishing to introduce malware into a system via a receptacle intended for a bespoke form factor drive would need the correct device. Unlike USB sticks, industrial removable memory devices and their corresponding receptacles are only available through authorised distributors.

Up a Level

Further protection can be afforded through moving away from ‘USB silicon’, particularly if there is no need for a large volume of memory. For example, in early 2020 Datakey launched a new line of CryptoAuthentication™ memory tokens, designed for systems that require ‘cyber robust’ removable memory devices for applications that include the transfer of passwords (or other data needed for user authentication purposes) or for the physical transfer of security keys, certificates, sensitive data or system configuration files.

At the heart of all devices in this new line is a Microchip CryptoAuthentication high-security hardware IC. Its features include a unique and non-changeable 72bit serial number (set by Microchip), a 512bit one-time programmable (OTP) zone, a random number generator and a SHA-256 hash algorithm for data encryption.

However, and far from wishing to plug products, we cite this purely as an example of how ‘security robust’ you can make a system requiring removable memory devices.

As a minimum, move away from the USB form factor. It is being targeted too much by cyber-criminals plus there is the constant risk of others reading a lost or stolen drive. For applications requiring extremely high security, look to data encryption technologies that make unauthorised access and cloning virtually impossible.


This article appeared in the May 2021 launch issue of Electronics Today magazine.  It appeared in print, is online and is reproduced on our site with the editor’s kind permission here.






Leave a Comment