Skip to main content

Building an ARM-Based VxWorks RTOS on AT91RM9200

·799 words·4 mins
VxWorks ARM Embedded Systems RTOS Industrial Control
Table of Contents

Embedded real-time systems demand deterministic behavior, long-term stability, and efficient resource usage. VxWorks, Wind River’s real-time operating system, has long met these requirements across aerospace, defense, and industrial control systems. When paired with a capable ARM processor such as Atmel’s AT91RM9200, it forms a solid foundation for low-power, high-reliability embedded platforms.

This article presents a practical design walkthrough based on an industrial deployment by Nanjing Electric Research Power Automation Co., where an AT91RM9200-based VxWorks system was successfully applied to substation automation and power management products.


🔧 Why AT91RM9200 and VxWorks?
#

The AT91RM9200 is a 32-bit ARM9-based RISC microcontroller built around the ARM920T core. Running at up to 180 MHz and delivering roughly 200 MIPS, it balances performance with power efficiency—an essential trait for industrial and field-deployed equipment.

Key features include:

  • 32-bit external bus supporting SDRAM, Flash, and peripheral expansion
  • Rich I/O set: USART, SSC, SPI, I²C, USB, and Ethernet
  • Peripheral Data Controller (PDC) for DMA-style transfers
  • Integrated USB 2.0 host and 10/100 Mb Ethernet MAC
  • Very low power consumption in both active and standby modes

VxWorks complements this hardware with a compact, microkernel-based RTOS architecture. It supports:

  • Preemptive priority scheduling and round-robin scheduling
  • Deterministic interrupt and task latency
  • Robust inter-task communication and synchronization
  • Extremely small kernel footprint (as low as a few kilobytes)

The combination was chosen for products such as NSA3000 substation automation systems and NSA6000 power load management platforms, where reliability and real-time response are critical.


🧱 Hardware Architecture Overview
#

The hardware platform is centered on the AT91RM9200 and includes:

  • SDRAM for runtime memory
  • Flash for bootloader and OS storage
  • Analog-to-digital sampling interfaces
  • Serial ports for console and device communication
  • USB and Ethernet interfaces for external connectivity
  • Real-time clock and power management circuitry
  • External crystal oscillators and expansion buses

This configuration supports continuous data acquisition, control processing, and network communication while maintaining low cost and power consumption—ideal for power system automation.


🛠️ Development Environment with Tornado
#

VxWorks development is performed using the Tornado integrated environment, which provides a complete toolchain for embedded RTOS work.

Key components include:

  • VxSim for simulation
  • Shell for non-kernel execution and diagnostics
  • Browser for memory and object inspection
  • WindView for event tracing and timing analysis
  • Debugger for source-level debugging

For the AT91RM9200, which is an ARM9 little-endian processor, the ARMARCH4gnu toolchain is selected. Tornado manages project creation, compilation, linking, image download, and debugging, significantly reducing development friction.


🚀 Boot Process and System Startup
#

A predictable boot sequence is essential for real-time systems. The VxWorks startup flow on AT91RM9200 follows a well-defined progression:

  1. romInit()
    Executes immediately after reset, disables interrupts, and initializes basic hardware and SDRAM.

  2. romStart()
    Copies program code and initialized data from Flash into SDRAM.

  3. sysInit()
    Clears the BSS segment and invokes sysHwInit() for board-level hardware initialization.

  4. kernelInit()
    Starts the VxWorks kernel and core services.

  5. usrRoot()
    Performs higher-level initialization, including I/O systems, networking, and application startup.

This sequence ensures that hardware is fully prepared before multitasking begins.


🔌 Driver Development and BSP Integration
#

In VxWorks, applications access hardware through device drivers integrated into the Board Support Package (BSP). The BSP is responsible for:

  • Hardware initialization
  • Interrupt vector configuration
  • Exposing hardware services to the OS

Drivers may operate in polling or interrupt-driven modes. Interrupt service routines are kept minimal to avoid latency and deadlock risks.

Examples from the implementation include:

  • Flash Driver
    Supports erase, read, write, and reset operations for SST39VF6401B devices and integrates with the TrueFFS file system.

  • Serial Driver
    Manages transmit and receive buffers, defines console ports, and configures baud rates via BSP settings.

  • Ethernet Driver
    Initializes the on-chip EMAC, performs PHY auto-negotiation, handles frame transmission and reception, and supports multicast traffic.


⏱️ Task Scheduling and System Control
#

The runtime system uses a root task to coordinate all application tasks. Scheduling is based on:

  • Priority preemption, where higher-priority tasks can interrupt lower-priority ones
  • Round-robin scheduling among tasks of equal priority

In the absence of a hardware watchdog, a software watchdog mechanism is implemented to detect stalled tasks and recover from abnormal conditions. Task priorities are assigned according to real-time urgency, ensuring fast response for time-critical power system operations.


🧩 Deployment Results and Practical Value
#

The AT91RM9200-based VxWorks platform demonstrated:

  • Stable long-term operation
  • Efficient use of CPU and memory resources
  • Predictable real-time performance
  • Scalability across multiple industrial products

Its successful deployment in NSA3000 and NSA6000 systems confirms the suitability of this architecture for substation automation and power management applications.


🏁 Final Thoughts
#

This design illustrates how combining an ARM9 processor with VxWorks yields a reliable, low-power, and scalable embedded real-time system. By carefully integrating hardware design, boot sequencing, BSP development, and task scheduling, the platform meets the stringent demands of industrial automation.

For engineers working on ARM-based RTOS platforms, this approach provides a proven reference for building deterministic and maintainable embedded systems using VxWorks.

Related

VxWorks in Aerospace and Defense: Powering Missions Beyond Earth
·756 words·4 mins
VxWorks RTOS Aerospace Defense Embedded Systems
VxWorks vs VxWorks.bin: Understanding the Key Differences
·683 words·4 mins
VxWorks RTOS Boot Image BSP Embedded Systems
Priority Inversion and Solutions in VxWorks
·435 words·3 mins
VxWorks RTOS Priority Inversion Priority Inheritance Semaphores Embedded Systems Programming Tutorial