Look at any sufficiently advanced CNC machine or robot, and you’ll notice something peculiar. On one hand, you have a computer running a true operating system for higher-level processing, be it vision or speech recognition, or just connecting to the Internet. On the other hand, you have another computer responsible only for semi-real-time tasks, like moving motors, servos, and reading sensors and switches. You won’t be doing the heavy-lifting tasks with a microcontroller, and the Raspberry Pi is proof enough that real-time functions aren’t meant for a chip running Linux. There are many builds that would be best served with two processors, but that may be changing soon.
Microchip recently announced an addition to the PIC32 family of microcontrollers that will support hardware virtualization. This addition comes thanks to the MIPS M5150 Warrior-M processor, the first microcontroller to support hardware visualization.
For microprocessors, hardware virtualization has been around for a long time. The first experiments with hardware virtualization began in the IBM System/360 era, with hardware extensions to the x86 architecture showing up in Intel and AMD processors a decade ago. Microcontrollers and systems on a chip have not had hardware virtualization, and the new MIPS M5150 is the first microcontroller to offer the capability.
The virtalization of the MIPS M5150 is accomplished by a hypervisor provided by Seltech. On top of this hypervisor, a number of different operating systems, from real-time systems to pedestrian Linux apps can run concurrently, completely separated from each other.
In a video from Imagination Technologies (available below), the true power of hardware virtualization on a microcontroller can be found. A MIPS M5150 CPU runs Linux and the uiTRON operating systems on the same CPU. The uiTRON system controls a motor, and the Linux boots and restarts, without affecting the real-time system. Try doing that with any of the dozens of ARM Linux boards out there.
While the PIC32 isn’t exactly an extraordinary powerful microcontroller – in terms of performance, it’s more akin to the SoC you would find in a router – the ability to run real-time systems alongside general purpose operating systems is a game changer. With hardware virtualization, applications ranging from smart robots, exceptionally capable quadcopters, and CNC controllers that actually make sense are possible.