VxWorks RTOS Design on ARM AT91RM9200 Embedded System
This article outlines the end-to-end design of an embedded real-time system based on VxWorks running on the AT91RM9200 ARM processor. It covers hardware architecture, development environment setup, boot sequence, BSP and driver implementation, and task scheduling strategies.
The system has been successfully deployed in industrial power automation platforms, demonstrating strong reliability and deterministic real-time performance in production environments.
โ๏ธ System Overview and Design Goals #
The system is built around the AT91RM9200 ARM9 processor and leverages VxWorks for deterministic real-time execution. The design targets industrial control scenarios requiring:
- High reliability and fault tolerance
- Deterministic scheduling and fast interrupt response
- Scalable architecture with modular components
- Efficient resource utilization on constrained hardware
๐ง ARM AT91RM9200 Processor Features #
The AT91RM9200 is a 32-bit ARM920T-based microcontroller optimized for embedded real-time systems.
Key Capabilities #
- CPU Performance: Up to 180 MHz (~200 MIPS)
- Low Power Consumption: ~30.4 mA active, ~3.1 mA standby
- Flexible Memory Interface:
- 32-bit external bus
- Supports SDRAM, SRAM, NAND Flash, NOR Flash, CompactFlash
- Peripheral Integration:
- USART, SPI, SSC, IยฒC
- USB 2.0 Host
- 10/100 Ethernet MAC
- DMA Support:
- 20-channel Peripheral Data Controller (PDC)
- System Features:
- Real-time clock (RTC)
- Watchdog timer
- Power management support
These features make it well-suited for real-time control and communication-intensive applications.
๐งฉ Hardware Architecture #
The embedded platform integrates the following components:
- 64 MB SDRAM
- 8 MB Flash memory
- 8-channel 12-bit ADC
- RS-232 / RS-485 serial interfaces
- USB Host interface
- Ethernet interface
- Real-time clock (RTC)
- Watchdog module
- Power supply and clock circuitry
- Bus expansion interfaces
This configuration supports both control logic and communication workloads typical of industrial automation systems.
๐ฅ๏ธ VxWorks RTOS Characteristics #
VxWorks provides a high-performance real-time kernel with a modular architecture tailored for embedded systems.
Core Capabilities #
-
Deterministic Scheduling:
- Priority-based preemptive scheduling
- Round-robin scheduling for equal-priority tasks
-
Efficient Task Management:
- Lightweight task creation and context switching
- Low interrupt latency
-
Inter-Task Communication:
- Semaphores, message queues, shared memory
-
Scalability:
- Microkernel architecture (configurable footprint as small as ~8 KB)
-
Proven Reliability:
- Widely deployed in aerospace, defense, and industrial systems
๐ ๏ธ Development Environment (Tornado) #
The Tornado IDE provides an integrated toolchain for VxWorks development.
Toolchain Components #
- VxSim โ simulation environment
- Wind Shell / Browser โ runtime interaction and inspection
- WindView โ system-level trace and performance analysis
- Debugger โ source-level debugging
For AT91RM9200 (ARM9, little-endian), the ARMARCH4gnu toolchain is used for:
- Project creation
- Compilation and linking
- Downloading images to target
- Runtime debugging
๐ VxWorks Boot Process #
The system boot sequence follows a well-defined initialization flow:
-
romInit()
- Entry point after reset
- Disables interrupts
- Initializes SDRAM
-
romStart()
- Copies program sections from Flash to SDRAM
-
sysInit()
- Clears BSS segment
-
sysHwInit()
- Performs hardware-specific initialization
-
kernelInit()
- Initializes and starts the VxWorks kernel
-
usrRoot()
- Final system setup
- Initializes I/O, networking, and application tasks
This staged initialization ensures controlled system bring-up and deterministic startup behavior.
๐ BSP and Device Driver Implementation #
Board Support Package (BSP) #
The BSP provides the abstraction layer between hardware and VxWorks:
- Hardware initialization routines
- Interrupt handling setup
- Driver integration interfaces
- System configuration
It separates hardware-dependent logic from application-level software.
Device Driver Design Principles #
Driver development follows a structured approach:
- Identify hardware resources (memory, I/O, IRQ)
- Initialize device registers and modes
- Implement interrupt service routines (ISRs)
ISR Design Constraints #
- Minimize execution time
- Avoid blocking operations
- Prevent deadlocks (no unsafe resource locking)
- Return control quickly
Implemented Drivers #
Flash File System #
- Supports erase, read, and write operations
- Based on SST39VF6401B
- Integrated with TrueFFS file system
Serial Driver (UART) #
- Buffered input/output
- Console interface support
- Configurable baud rate
Ethernet Driver (EMAC) #
- Controller initialization
- PHY auto-negotiation
- Packet transmission and reception
- Multicast support
โฑ๏ธ Task Scheduling and System Management #
A root task is responsible for orchestrating all application tasks.
Scheduling Strategy #
-
Priority-Based Preemption
- Ensures high-priority tasks execute immediately
-
Round-Robin Scheduling
- Applied to tasks with equal priority
Software Watchdog #
Due to the absence of a hardware watchdog in this configuration, a software watchdog mechanism was implemented:
- Periodic system health monitoring
- Fault detection and recovery
- Improves runtime reliability
๐ Industrial Deployment and Results #
The system has been successfully deployed in:
- NSA3000 Substation Integrated Automation System
- NSA6000 Power Load Management and Energy Acquisition System
These deployments validate:
- Stability under continuous operation
- Deterministic real-time behavior
- Scalability across industrial applications
๐งพ Conclusion #
Combining the AT91RM9200 ARM processor with the VxWorks RTOS results in a robust and scalable embedded real-time platform. The system achieves:
- Efficient resource utilization
- High reliability and fault tolerance
- Deterministic scheduling and fast response
- Flexible extensibility through modular design
Its successful use in industrial automation systems demonstrates its practicality and effectiveness for mission-critical embedded applications.