Embedded File System Adds RAID5 Support

SEGGER Microcontroller has added a RAID5 option to its emFile embedded file system to maximize data integrity and reliability. RAID5 delivers a high level of data integrity by providing an additional layer of fail-safety on top of the CRC and/or error correction used by the underlying driver or storage medium. With RAID5, the storage device is divided into several partitions, one of which holds parity information allowing data recovery in case of a partition fail. It can be used on any storage medium and the parity information can be stored on the same storage device (in a separate partition) or on a separate device.
The add-on has a tiny memory footprint, typically using about 1 KB of RAM and 3 KB of flash memory. RAID5 is available as an additional option and as an alternative to RAID1. RAID1 has been in the market for many years, and proven its value over and over, but does use 50% of the raw storage capacity for data security. The amount of storage used by RAID5 is configurable, typically using 5% or less. Being part of the emFile storage layer, the new add-on can also be used for USB Mass storage as well as other applications.

SEGGER Microcontroller | www.segger.com

Connecting USB to Simple MCUs

Helpful Hosting

Sometimes you want to connect a USB device such as a flash drive to a simple microcontroller. The problem is most MCUs cannot function as a USB host. In this article, Stuart steps through the technology and device choices that solve this challenge. He also puts the idea into action via a project that provides this functionality.

By Stuart Ball

Even though many microcontrollers (MCUs) may have a USB device interface that can connect to a host, rarely is a host interface available on simple MCUs. There are various reasons for this, including the complexity of implementing a USB host interface on a simple processor, the need to enumerate and recognize many device types and the memory required to do so. Functioning as a single USB device is much simpler. Implementing a host interface also puts some constraints on the MCU for throughput and clock speed choices.

I have been working on a retro CPU board design, using the Z80180 processor that can run the old CP/M-80 operating system. This is just a fun project, with no real practical use. But the project needed storage that could replace the floppy disk normally used in CP/M. I considered using SD cards, but in experimenting with them, I decided that they are just not what I wanted. What I did want was the ability to plug a USB flash drive into the circuit.

Even though my CP/M project is not that useful, there are other applications where the ability to plug a USB flash drive into an MCU-based circuit is desirable. Examples include:

• Capturing logging or debug data
• Flashing new code into the MCU
(if the MCU has self-programming flash)
• Downloading crypto keys or other
one-time data to the MCU
• Downloading configuration information
to enable or disable features
• Downloading language translation
information
• Retaining critical data
• Serving as a “key” to restrict access to
maintenance mode functions only
to authorized personnel
• Downloading GPS coordinates or map
information
• Updating stored part numbers, serial
numbers or any stored value that can
change.

There are ways to implement USB host capability on an MCU, especially if it has a USB interface that supports OTG (on-the-go) USB capability. But no matter how you do it, you have to write or obtain drivers and integrate the functionality into your software. You will also be constrained as to which MCUs you can use, based on availability of USB host capability. But for a simple design, you may not want to be forced to use a part just because it has USB host capability.

VDrive3

FTDI makes a USB host module called the VDrive3 that provides a limited USB host interface and can connect to an MCU (or even a PC) using an asynchronous serial port. The module also has an SPI interface, although I did not use that in my design. A link to the datasheet is provided on the Circuit Cellar article materials webpage.

The VDrive3 (Figure 1) uses the FTDI Vinculum IC, which provides a USB host interface on one side and a serial or SPI interface to your MCU on the other. Since all of the hardware and software to implement the USB host interface is inside the VDrive3 module, you don’t need to develop USB stacks or drivers, or deal with licensing issues. The VDrive3 comes in a plastic housing so it is easy to mount in a rectangular cutout.

Figure 1
VDrive3 module. The module comes with the attached cable, which I modified to use a different connector on my board.

The VDrive3 has a file-based interface for USB flash drives, which means that you don’t need to manage the memory yourself. You open files, write to them, read them, close them and create directories. The VDrive3 shields the host from the memory management functionality, allowing all this to be done with simple commands over the serial interface. The VDrive3 manages the file system so you don’t have to.

In my application, I was emulating a floppy disk. I defined the “virtual floppy” to have 256 tracks of 32 sectors each. To implement that on the VDrive3, I created 256 directories named TRAK000 through TRAK0FF. In each directory, I created 32 files named SEC00 through SEC1F. So, when the CP/M operating system wants to read or write a specific sector, the AVR MCU navigates to the directory that represents the selected track and opens the sector file corresponding to the specified sector.

This is a simple mechanism that is really applicable only to the way I’m using the flash drive, but the general principles apply to any VDrive3 application. You can create a directory, and then create files within the directory that correspond to whatever information you need to store. Or you can skip the directories and store everything at the top directory level.

One advantage of using the VDrive3 is interoperability with a PC. If I used SD drives, I would either have a proprietary format that couldn’t be read in a PC, or else I’d have to manage a PC-compatible file system in my MCU. But the VDrive3 recognizes the standard FAT12, FAT16, and FAT32 file systems, so a flash drive written on a VDrive3 can be inserted into a PC and read. This could be very useful if you are collecting debug or log data from your MCU application. In my case, I could make a copy of a CP/M “floppy” on a PC.

Commands

The VDrive3 recognizes various commands, including SEK (seek to file offset), OPW (open file for writing) and WRF (write to file). The commands used in my application are listed in Table 1. VDrive3 commands can be sent in ASCII as in the command list in Table 1, or you can configure it to use a short command set that requires fewer bytes to transmit. Data can be either ASCII or binary. The VDrive3 defaults to the extended command set and binary data transfer, and I leave the module in that mode for my application.

Table 1
The VDrive3 recognizes various commands. Shown here are the commands used in my application. VDrive3 commands can be sent in ASCII as in this command list, or you can configure it to use a short command set that requires fewer bytes to transmit.

Generally, each command is sent as a string of two or three characters. If data such as a filename are needed, the command is followed by a space, the appropriate text and a carriage return character (0x0D). If no data are needed, such as for the FWV (FW version) command, the command can be immediately followed by the carriage return. Setting the baud rate requires a divisor value, so the SBD command (set baud rate) is followed by a 3-byte divisor value and then a carriage return. …

Read the full article in the January 342 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Intel & Micron Expand Manufacturing Effort

Intel and Micron have announced the completion of an expansion to Building 60 (B60) at the IM Flash facilities in Lehi, Utah. The expanded fab will produce 3D XPoint memory media, a building block of Intel Optane technology that includes Intel Optane memory for clients, the recently announced Intel Optane SSD 900P Series and new capacities and form factors of the Intel Optane SSD DC P4800X Series. A ribbon-cutting was held at the facility with Utah Gov. Gary Herbert, employees of the facility and representatives from Intel and Micron.

Intel-Optane-SSD-900P-Series

The Intel Optane SSD 900P Series half-height half-length add-in card is available in 480 GB and 280 GB capacities.

The IM Flash joint venture was created in 2006 to manufacture non-volatile memory for both Intel and Micron, starting with NAND for use in SSDs, phones, tablets and more. In 2015, IM Flash began manufacturing 3D XPoint technology, the first entirely new memory media in 25 years. The technology was developed to meet the quickly expanding data needs for all types of customers. 3D XPoint technology uses a crosspoint structure to deliver a cell and array architecture that can switch states significantly faster than NAND.

Intel recently announced the Intel Optane SSD 900P Series for use in desktop and workstation PCs. It delivers incredibly low latency and best-in-class random read and write performance at low queue depths. Additionally, Intel expanded the Intel Optane technology offerings for the data center, introducing 750GB capacity and 2.5-inch U.2 form factor versions of the Intel Optane SSD DC P4800X Series. For details on these products and all Intel SSDs, visit Intel’s solid state drives website.

Intel | www.intel.com

Micron Technology | www.micron.com

Xilinx Provides Design Platform for Scalable Storage

At the Flash Memory Summit earlier this month in Santa Clara, CA, leading FPGA vendor Xilinx rolled out the Xilinx NVMe-over-Fabrics reference design. It provides designers a flexible platform to enable scalable storage solutions and integrate custom acceleration functions into their storage arrays. The reference design eliminates the need for a dedicated x86 processor or an external NIC, thus creating a highly integrated, reliable and cost-effective solution. The NVMe-over-Fabrics (NVM-oF) reference platform is implemented on the Fidus Sidewinder card which supports up to 4 NVMe SSDs, and has a Xilinx ZU19EG Ultrascale+ MPSoC device. The reference platform is delivered with the required software drivers.

The Xilinx NVMe-over-Fabric Platform is a single-chip storage solution that integrates NVMe-over-Fabric and target RDMA offloads with a processing subsystem to provide a very power-efficient and low-latency solution compared to existing products that require both an external host chip and a Network Interface Card (NIC). This 2x100Gb Ethernet platform enables customers to implement value-added storage workload acceleration, such as compression and erasure code.

Xilinx | www.xilinx.com

New 3D NAND SSDs for Embedded Applications

Interested in wafer-packaged NAND flash storage solutions?  ATP Electronics recently launched a new generation of storage solutions using the  latest 3D NAND flash technologies. These new 3D NAND-based SSDs are targeted at the industrial and embedded markets for industrial, IoT, medical, automotive, and telecom applications.ATP NAND SSDs

ATP provides various chip densities using DDP, QDP, and even ODP die-stacking while using the same wafer stock. This offers flexibility in supply chain, and also enables ATP to ramp multiple product densities quickly. The new 3D NAND solutions are reliable, cost-effective storage solutions.

Source: ATP Electronics

Cabinet-Based DIY Electronics Workspace

Micrcontrollers and electrical engineering probably don’t come to mind when you flip through an IKEA product catalog. But when you think about it, IKEA has plenty of easy-to-assemble tables, cabinets, and storage containers that could be handy for outfitting a electronics workspace or “circuit cellar.”

(Source: Patrik Thalin)

(Source: Patrik Thalin)

Sweden-based Patrik Thalin built a workspace within an IKEA Husar cabinet. The setup is compact, orderly, and well-planned. He noted:

It has a pull-out keyboard shelf that I use it as an extension of the workspace when the doors are open. My inspiration came from a friend that had built his lab in a two door closet. The main idea is to have a workspace that can be closed when not used and to be able to resume my work later. I have used this lab for nearly ten years and I am still happy with it!

In the upper part of the cabinet I keep commonly used tools and instruments. On the top shelf are two PSUs, a signal generator, assortment boxes with components, the SMD component kit and shelf trays with cables and small tools. On the lower shelves are things like multimeter, callipers and a power drill. At the bottom is the work space with a soldering station. On the left wall are screwdrivers,wrenches and pliers. To the left are cables hanging on hooks.The thing hanging under the shelf is an old radio scanner. You can also see a small vise hanging on the front of the workspace.

The lower part of the cabinet is for additional storage, he noted.

(Source: Patrik Thalin)

(Source: Patrik Thalin)

The information and images were submitted by Patrik Thalin. For more information about his space and work, visit his blog.