Introduction to uCOS-II V2.6... Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6Copyright • Materials in this course is the property of Amr Ali Abdel-Naby.. Amr Ali Abdel-Naby@2010 I
Trang 1Introduction to uCOS-II V2.6
Trang 2Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
About SwiftACT
• A Technology services startup company
o Under establishment
• Areas of specialties:
o Mobile telecommunication services development
o Embedded systems development
• Types of services:
o Consultation
o Managed services
o Sourcing
o Training
Trang 3Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
About Me
• Graduated 2004
o ECE, ASU: 5 yrs distinction
• 5+ years in embedded systems development
o SDLC, Apps, MW, DD, Porting,
• 3+ years in SW engineering
o PSP, CMMI, Systematic reuse,
• 3+ years in SW testing
o IBM certified, ISTQB certified,
Trang 4Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
Copyright
• Materials in this course is the property of Amr Ali Abdel-Naby
• Reproduction or transmission of the materials in any manner without the copyright owner permission is a law violation
Trang 5Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
Course References
• MicroC/OS-II The Real-Time Kernel, 2nd Edition, by Jean J Labrosse
Trang 6Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
Outline
• Introduction to µC/OS-II
• Kernel Structure
• Task Management
• Time Management
• Semaphore Management
• Mutual Exclusion Semaphores
• Event Flag Management
• Message Mailbox Management
• Message Queue Management
• Memory Management
Trang 7Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
Outline
• Introduction to µC/OS-II
• Kernel Structure
• Task Management
• Time Management
• Semaphore Management
• Mutual Exclusion Semaphores
• Event Flag Management
• Message Mailbox Management
• Message Queue Management
• Memory Management
Trang 8Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
Time Management APIs
• Available time operations are:
o Delaying a task
o Resuming a delayed task
o System time getting & setting
Trang 9Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
Delaying a Task, OSTimeDly
void OSTimeDly (INT16U ticks)
• ticks: The time delay that the task will be suspended in number of clock ticks
time 10ms
OSTickISR()
All HPT
LPT
5ms OSTimeDly(1)
Trang 10Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
Delaying a Task, OSTimeDlyHMSM
INT8U OSTimeDlyHMSM (INT8U hours, INT8U minutes, INT8U seconds, INT16U milli)
• hours: The number of hours that the task will be delayed
• minutes: The number of minutes
• seconds: The number of seconds
• milli: The number of milliseconds
• Return value:
Trang 11Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
Resuming a Delayed Task, OSTimeDlyResume
INT8U OSTimeDlyResume (INT8U prio)
• prio: Specifies the priority of the task to resume
• Return value:
Trang 12Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
System Time, OSTimeSet
void OSTimeSet (INT32U ticks)
• ticks: Specifies the new value that OSTime needs to take
Trang 13Amr Ali Abdel-Naby@2010 Introduction to uCOS-II V2.6
System Time, OSTimeGet
INT32U OSTimeGet (void)
• Return value: