μC/OS- Ⅱ Transplantation Research AVR system
- Author
- YaoXuYing
- Advisor
- WuGuangMin
- School
- Kunming University of Science and Technology
- Major
- Physical Electronics
- Classification
- TP316 Operating system
- Degree
- Master's thesis
- Year
- 2007
- Downloads
- 433
- Citations
- 0
Abstract
Firstly, a brief introduction of the microprocessor Atmega128 and μC/OS- Ⅱ , embedded real-time multi-tasking operating system . Focuses on the key elements of the operating system on the AVR microcontroller transplanted . Starting from understand μC/OS- Ⅱ operating system works , mainly related to the the transplant μC/OS- Ⅱ operating system conditions as well as users to migrate operating systems need to modify the file and its code . The article also mentioned μC/OS- Ⅱ operating system should be noted that among the transplant . As an open source preemptive multitasking RTOS kernel , embedded real-time operating system μC/OS- Ⅱ , performance and security , competition and commercial products . Since 1992 , the first edition of μC/OS- Ⅱ have hundreds of applications , is a proven easy to use and reliable kernel . With the increased demand for real-time performance of the various applications of complex electronic systems and systems , and accompanied by the acceleration of application software development towards the systematic direction , in the 16 /32 bit microcontroller widespread use of embedded real-time operating system , and at the same time in actual use, there are also a large number of 8 -bit microcontrollers . μC/OS- Ⅱ transplant applications of real - time operating system on the PC as well as a variety of modern microprocessor . AVR microcontroller Atmega128 is the top product in the 8-bit machine , there is a strong features . The Atmega128 μC/OS- Ⅱ operating system build a combination of embedded systems platform , has a very broad application prospects . μC/OS- Ⅱ as an operating system , open source code , code structure is very clear and methodical organization , portability, and can be cut , curable . However , during the application of the different systems require different transplant . This article by μC/OS- Ⅱ operating system on the AVR microcontroller ( processor Atmega128) transplant the Atmega128 processor transplant on μC/OS- Ⅱ operating system a number of important issues detailed analysis and research . Finally, the achieved after transplantation in SL-MEGA128 system platform , the system is running .
Table of contents
Abstract 3-4
ABSTRACT 4-5
directory 5-8
first chapter 8-10 <br / > 1.1 Introduction 8-9
1.2 In this thesis, the main work 9-10
Chapter ATMEGA128 kernel 10-22
2.1 ATmega128 kernel 11-14
2.1.1 Arithmetic Logic Unit (ALU) 12
2.1.2 Status Register (SREG) 12-13
2.1. 3 Purpose Working Registers group 13-14
2.2 program memory flash 14
2.3 data storage space (internal only) 14-15
2.4 stack 15-16
2.4.1 stack pointer (stack pointer) 15-16
2.5 interrupt handling 16-22
2.5.1 ATmega128's Interrupt response mechanism 16-17
2.5.2 interrupt response time 17-18
2.5.3 ATmega128 timer interrupt 18
2.5. 4 clock 18-19
2.5.4.1 clock system 18-19
2.5.4.2 clock source 19
2.5.5 8-bit timer / Counter T / C (TCNTO) 19-22
2.5.5.1 T / C (TCNTO) register 19
2.5.5.2 T / C control register TCCRO 19-21
2.5.5.3 T / C (TCNTO) operating mode 21-22
Chapter MC/OS- Ⅱ 22-29
3.1 μC/OS- Ⅱ features 22-23
3.2 μC/OS- Ⅱ important concepts in 23-29
3.2.1 critical section of code 23
3.2.2 Resource 23
3.2.3 kernel (Kernel) 23-24
3.2.4 scheduler (Scheduler) 24 < br /> 3.2.5 preemptive kernel 24
3.2.6 Interrupt 24-26
3.2.6.1 interrupt latency 24-25
3.2.6.2 interrupt response 25
3.2.6.3 interruption recovery time (Interrupt Recovery) 25-26
3.2.6.4 Interrupt processing time 26
3.2.7 beat the clock (Clock Tick) 26
3.2.8 Task 26-27
3.2.8.1 multitasking 27
3.2.8.2 task switching (Context Switch or Task Switch) 27
3.2.8.3 task priority assignment 27
3.2.9 disable interrupts and open break 27-29 < br /> Chapter MC/OS- Ⅱ transplant 29-61
4.1 transplant conditions 29
4.2 μC/OS- Ⅱ operating system migration tools 29-30
4.2.1 ICCAVR6.30 Profile 29-30
4.2.2 AVR Studio4.12 Profile 30
4.3 portable implementation 30-50
4.3.1 INCLUDES.H file 31
4.3.2 OS_CPU.H file 31-34
4.3.2.1 OS_CPU.H external macro definition 31-32
4.3.2.2 constants associated with the processor, macros, and type definitions 32
4.3.2.3 enter the critical code segments (critical code section) method 32-33
4.3.2.4 OS_CPU.H, stack grows 33
4.3.2.5 OS_CPU.H, task switching function OS_TASK_SW () 33-34
4.3.2.6 OS_CPU.H, global variables 34
4.3.2.7 OS_CPO.H, function prototypes defined 34
4.3.3 OS_CPU_C.C file 34-41
4.3.3.1 OS_CPU_C.C, OSTaskStkInit () 35-39
4.3.3.2 OS_CPU_C.C, OSTaskCreateHook () 39-40 <br / > 4.3.3.3 OS_CPU_C.C, OSTaskSwHook () 40
4.3.3.4 OS_CPU_C.C, OSTimeTickHook () 40-41
4.3.4 OS_CPU_A.S file 41-50
4.3.4.1 OSStartHighRdy () 41-44
4.3.4.2 OSCtxSw () 44-47
4.3.4.3 OSIntCtxSw () 47-48
4.3.4.4 OSTickISR () 48-50
4.4 application code 50-56
4.4.1 includes.h 50
4.4.2 Creating a Task 50-51
4.4.2.1 with OSTaskCreate () function to create a task 50-51
4.4.2.2 with OSTaskCreateExt () function creates task 51
4.4.3 beat the clock to achieve 51-52
4.4.4 application app.c 52-54
4.4 .5 task scheduling 54-56
4.5 portable code test 56-61
4.5.1 compiler 56-58
4.5.2 Commissioning and Software emulation 58-59
4.5.3 in SL-MEGA128 systems running the experiment 59-61
chapter conclusions 61-63 <br / > Thanks 63-64
References 64-66
Appendix A 66
Related dissertations
- Cable Detection System Design Based on ATmega128 Microcontroller
- Design of Data Acquisition System Based on USB and μCOS-Ⅱ
- The Kernel Analysis and the Porting Based on ARM of Embedded Operating Systems
- Research and Design of Monitoring System for Storage Battery Formation Processing Based on AVR
- The Design and Implementation of Remote Wireless Data Collection System for Agricultural Microclimate Based on AVR
- Design of Embedded Linux Mobile Video Monitoring System Based on S3C2440
- The Design of6LoWOAN Gateway Based on Contiki
- On Transplant of the Educational Institution
- On the Perfection of the Legal System in the Human Organ Transplantation in China
- The Experimental Research of Angiogenesis of Endothelial Rogenitor Cells Transplant in Rats with Acute Pancreatitis
- Transplantation Effects of iPMSCs Regulated by Conophylline via PI3K Pathway in Diabetic Mice
- Epidemiological Investigation of Hypertensive Retinopathy in Part Residents of Shandong Province
- Aquaculture Aeration Intelligent Systems
- Study and Design on Power Quality Online Monitoring System Based on ATT7022CU
- Analysis and Design on Elevator Intelligent Control System
- Reserch of Automatic Focusing Control and Assembly Technolog of Vehicle Camera
- The Research and Design of a Parking Fee Collective System Based on ARM9
- Analog Control System Based on Virtual Instrument of Vehicle-Mounted Gun Study
- Research and Design of Rotating Blade Vibration Acquisition System
- Design and Implementation of CNC Data Transmission Based on XBee-PRO