This port facilitates the deployment of Sirius RTOS and other products on Atmel ARM7 microprocessors within the AT91SAM7S family. The following processors are supported:
The following table lists all port files associated with this architecture:
| File name | Extension | Description |
|---|---|---|
| AR_API | H | Port API File |
| AR_Types | H | Type declarations file |
| AR_AT91 | C | Port source file |
| AR_AT91a | S | Port assembly file |
| AR_AT91SAM7S* | H | Atmel definitions for specific processor |
The Periodic Interval Timer (PIT) generates the interrupt for the operating system scheduler. It is configured to provide an interval of 0.1 milliseconds.
The Real-Time Timer (RTT), configured for a one-millisecond interval, is utilized by the arGetTickCount function to maintain system time.
The arLock and arRestore functions manage preemption disabling and re-enabling by modifying the standard interrupt (IRQ) enable state.
The arYield function performs a context switch without utilizing an additional software interrupt.
All tasks execute in Supervisor Mode. When the operating system calls the port-specific arSetPreemptiveHandler function, it does not allocate a new stack or task context for the operating system scheduler. This is because the scheduler executes in IRQ Mode, which possesses its own distinct stack and register set.
AT91SAM7S processors support switching to an idle mode. The arSavePower function disables the Processor Clock by writing to the System Clock Disable Register (PMC_SCDR). When the Processor Clock is disabled, the clock stops after the current instruction completes. This action does not affect data transfers initiated by other system bus masters.
The AR_AT91SAM7S_PITC_PIV constant defines the interval of the Periodic Interval Timer (PIT) used to generate interrupts for the operating system scheduler. The default value is 300, corresponding to a 0.1-millisecond interval. For further details, please refer to the Atmel documentation regarding the PIT on AT91SAM7S processors.
The AR_AT91SAM7S_RTTC_RTPRES constant configures the Real-Time Timer prescaler, adjusting the resolution of values returned by the arGetTickCount function. The default value is 32, providing a one-millisecond interval. For further details, please refer to the Atmel documentation regarding the RTT on AT91SAM7S processors.
The task context contains all information required to resume the execution of a preempted task. The table below details the 64-byte task context structure for AT91SAM7S processors:
| Offset | Size | Description |
|---|---|---|
| 0000 | 4 | R15 (PC) register - Task startup procedure |
| 0004 | 4 | R14 register, original Link Register value |
| 0008 | 4 | R12 register |
| 000C | 4 | R11 register |
| 0010 | 4 | R10 register |
| 0014 | 4 | R9 register |
| 0018 | 4 | R8 register |
| 001C | 4 | R7 register |
| 0020 | 4 | R6 register |
| 0024 | 4 | R5 register |
| 0028 | 4 | R4 register |
| 002C | 4 | R3 register |
| 0030 | 4 | R2 register |
| 0034 | 4 | R1 register |
| 0038 | 4 | R0 register |
| 003C | 4 | CPSR (Flags) register |