i
Contents
Chapter 1
User’s Manual Organization .................................................................................................... - 1 -
Chapter 2
General Information ................................................................................................................. - 3 -
2.1
Objective of MR308 Development...................................................................................................... - 4 -
2.2
Relationship between TRON Specification and MR308................................................................... - 6 -
2.3
MR308 Features ................................................................................................................................. - 7 -
Chapter 3
Introduction to MR308.............................................................................................................. - 9 -
3.1
Concept of Real-time OS .................................................................................................................. - 10 -
3.1.1
Why Real-time OS is Necessary ............................................................................................... - 10 -
3.1.2
Operating Principles of Real-time OS...................................................................................... - 13 -
3.2
Service Call ....................................................................................................................................... - 16 -
3.2.1
Service Call Processing ............................................................................................................. - 17 -
3.2.2
Task Designation in Service call .............................................................................................. - 18 -
3.3
Task ................................................................................................................................................... - 19 -
3.3.1
Task Status ................................................................................................................................ - 19 -
3.3.2
Task Priority and Ready Queue ............................................................................................... - 23 -
3.3.3
Task Priority and Waiting Queue............................................................................................. - 24 -
3.3.4
Task Control Block(TCB) .......................................................................................................... - 25 -
3.4
System States.................................................................................................................................... - 27 -
3.4.1
Task Context and Non-task Context ........................................................................................ - 27 -
3.4.2
Dispatch Enabled/Disabled States ........................................................................................... - 28 -
3.4.3
CPU Locked/Unlocked States ................................................................................................... - 29 -
3.4.4
Dispatch Disabled and CPU Locked States............................................................................. - 29 -
3.5
MR308 Kernel Structure.................................................................................................................. - 30 -
3.5.1
Module Structure....................................................................................................................... - 30 -
3.5.2
Module Overview....................................................................................................................... - 31 -
3.5.3
Task Management Function ..................................................................................................... - 32 -
3.5.4
Synchronization functions attached to task ............................................................................ - 34 -
3.5.5
Synchronization and Communication Function (Semaphore)................................................ - 37 -
3.5.6
Synchronization and Communication Function (Eventflag) .................................................. - 39 -
3.5.7
Synchronization and Communication Function (Data Queue) .............................................. - 41 -
3.5.8
Synchronization and Communication Function (Mailbox) ..................................................... - 42 -
3.5.9
Memory pool Management Function ....................................................................................... - 44 -
Fixed-size Memory pool Management Function ................................................................................................. - 44 -
Variable-size Memory Pool Management Function............................................................................................. - 45 -
3.5.10
Time Management Function..................................................................................................... - 47 -
3.5.11
Cyclic Handler Function ........................................................................................................... - 49 -
3.5.12
Alarm Handler Function........................................................................................................... - 50 -
3.5.13
System Status Management Function..................................................................................... - 51 -
3.5.14
Interrupt Management Function ............................................................................................. - 52 -
3.5.15
System Configuration Management Function ........................................................................ - 53 -
3.5.16
Extended Function (Short Data Queue) .................................................................................. - 53 -
3.5.17
Extended Function (Reset Function) ....................................................................................... - 54 -
3.5.18
Service calls That Can Be Issued from Task and Handler ..................................................... - 55 -
Chapter 4
Applications Development Procedure Overview.................................................................... - 59 -
4.1
Overview............................................................................................................................................ - 60 -