Mobile robots are increasingly used in a wide range of applications, from industrial automation to service robotics. Ensuring their reliable and safe operation is critical as these robots take on more complex tasks and operate in uncontrolled environments.
NXP's new MCX portfolio of microcontrollers help address these challenges. Built on the high-performance Arm® Cortex®-M33 core, MCX MCUs incorporate advanced error detection and correction features, making them well-suited for developing mobile robots requiring high reliability and safety levels.
Common Reliability and Safety Concerns in Mobile Robots
Mobile robots rely heavily on their onboard electronics to perceive their environment, make decisions and control their actions. However, their operating conditions can be challenging due to various factors such as temperature extremes, vibration and electromagnetic interference. These stressors can cause bit errors and corruption in the robot's memory over time. Therefore, we need to consider the long-term reliability of the electronics, as mobile robots are expected to have long operational lifespans.
Industrial AMRs
Memory errors can lead to various reliability and safety issues in mobile robots. A bit-flip in the robot's control firmware could cause it to execute incorrect instructions, leading to unintended behaviors. Corrupted sensor data could be misinterpreted, causing the robot to make incorrect decisions. Erroneous motor control outputs could result in unexpected motion or potentially damage the robot or its surroundings.
In safety-critical applications such as mobile robots operating near people, the consequences of such malfunctions could be substantial. Mobile robots need robust safeguards against memory errors to ensure reliable and safe operation.
Leverage edge processing to enable real-time decision making and enhanced autonomy. Explore NXP solutions for mobile robotics.
MCX Error Correction Features for Flash and RAM
The NXP MCX A microcontroller series incorporates several key features to detect and correct memory errors. The MCX A embeds up to 128KB of flash memory with error correction coding (ECC) capabilities (MCX A Reference Manual, Section 4.5). The MCX N series features up to 2MB of flash memory with ECC. Each 128-bit word of flash incorporates an additional 9 bits of ECC data.
ECC is a technique of storing redundant bits with each data word. These redundant bits help to check the data integrity by regenerating the ECC bits and comparing them with the stored ECC on every read operation. If the regenerated and stored ECC bits mismatch, it means there is an error, which ECC may be able to correct. ECC can also determine which bit is erroneous in case of a single-bit error. However, it can only detect the double-bit errors but not correct them.
Mobile Robot Example
If the microcontroller detects an ECC error, the System Controller (SYSCON) module can generate a bus fault or use an interrupt to handle the error. Flexible fault handling allows developers to customize their handling to best suit their applications.
The MCX A also provides 32KB of on-chip SRAM, with an 8KB block (RAMA0) incorporating ECC for single-error correction and double-error detection (SEC-DED - MCX A Reference Manual, Section 9.1.2). The MCX N series provides up to 416KB of RAM when configured as ECC, of which 32KB can be retained in VBAT mode. This feature protects critical runtime data, such as sensor inputs and algorithm state variables. The microcontroller implements an Error Reporting Module (ERM) to provide comprehensive reporting and control over errors. The ERM captures and logs error events from the ECC logic, providing visibility into the health of the memory subsystem. Developers can utilize this error information for diagnostics and predictive maintenance.
For self-diagnostics, the Error Injection Module (EIM) provides capabilities to inject errors when reading ECC RAM. This self-test feature allows developers to implement periodic self-checks to ensure the microcontroller operates reliably.
In addition to ECC, the MCX A series includes a Memory Block Checker (MBC) that provides runtime security control over read, write and execute permissions for different memory regions (MCX A Reference Manual, Section 45.1). By defining memory access policies, the MBC can prevent unauthorized memory access.
How MCX Error Correction Enables Reliable Robotics
The MCX's error correction features work together to improve mobile robot reliability and safety. By automatically correcting single-bit errors in flash memory, the MCX maintains the integrity of the robot's control firmware. This integrity prevents the robot from executing erroneous control logic that could lead to unintended behaviors.
The MCX is equipped to detect double-bit errors, which is crucial for ensuring the safety and reliability of its operations. While it is not possible to correct double-bit errors, detecting them helps prevent the use of corrupted instructions or data. When a double-bit error is detected, the robot can be gracefully put into a safe state, thus avoiding potential hazards or malfunctions.
The MCX's ECC extends its memory protection capabilities beyond flash to cover SRAM. The MCX A’s 8KB RAMA0 SRAM block incorporates ECC, while the MCX N can repurpose RAMG and RAMH for ECC correction, providing up to 416KB of ECC RAM. ECC RAM enables single-bit error correction and double-bit error detection for runtime data. This functionality safeguards critical data such as sensor readings, control outputs and intermediate algorithm variables from accumulating single-bit errors that could otherwise cause inconsistencies in the robot's perception, planning and control logic. By maintaining the integrity of this runtime data, the MCX's SRAM ECC helps ensure the robot's situational awareness and decision-making remain accurate and reliable. The MCX N additionally provides up to 32KB of ECC RAM which can be retained in VBAT mode, allowing for data to remain protected while in a low-power state.
The MBC provides an added layer of safety by enforcing memory protection policies. It can block unauthorized memory access, helping to contain faults and prevent them from causing uncontrolled robot behaviors.
Finally, the ERM enables a data-driven approach to robot maintenance. By logging memory error events, the ERM provides visibility into the health of the robot's electronics. An increasing rate of corrected errors could indicate an impending failure, allowing the robot to be serviced proactively.
Example Use Case
Consider a mobile service robot operating in an industrial environment. The robot must navigate autonomously, avoiding obstacles and people while performing tasks.
Mobile Service Robot
However, the industrial environment can be challenging, with equipment generating electromagnetic interference (EMI). Over time, EMI could cause bit errors in the robot's memory.
The MCX's ECC would detect and correct any single-bit errors induced by EMI, ensuring the robot executes its control logic correctly. If a more severe double-bit error occurred, the MCX would detect it and prevent the use of the corrupted data. The robot could then initiate a safe shutdown.
Throughout these events, the MCX's ERM would log the error occurrences. Maintenance staff could monitor these logs, watching for any trends indicating a potential failure. By servicing the robot proactively, downtime is minimized and safety is maintained.
MCUXpresso Developer Experience
For quick prototyping with MCX, NXP offers the low-cost FRDM development platform. FRDM development boards come with standard form factor and headers, easy access to MCU I/Os, on-board MCU-Link debugger and a USB-C cable.
NXP’s GitHub also provides access to application examples, which can be accessed using the Application Code Hub portal (ACH). MCUXpresso IDE and MCUXpresso for VS Code have ACH browsing built-in, so developers can easily search for available demos and examples, and filter by device, application technology or peripheral/feature before loading the project directly for use.
Expansion board hub (EBH) is an extension to NXP’s SDK Builder site where developers can find a range of add-on boards from NXP and partners to extend the capabilities of the chosen evaluation board. This hub gives intuitive filtering to quickly find boards and locate available supporting software. Developers can pair their board with different kinds of shields to evaluate and do rapid prototyping for specific use cases or applications.
NXP Enables Reliable and Safe Mobile Robotics
As mobile robots become more autonomous, ensuring their reliable and safe operation is essential. If not addressed, memory errors induced by challenging operating environments can lead to unexpected robot behaviors.
NXP's MCX microcontroller portfolio is well-equipped to meet the needs of reliable robotics with its error correction features. From ECC-protected flash and SRAM to runtime memory access control and error event logging, the MCX provides multiple layers of protection against memory errors.
Mobile robot designers aiming to optimize reliability and safety should consider the NXP MCX. Its advanced architecture and comprehensive feature set make it a strong platform for developing dependable autonomous robots.