RTOS embedded in the MSP430F148 microcontroller
source: application Author: Li Qiang Zhang Junmo Chen Yao : 2010-09-12
-
With the development of information society, information appliances, intelligent instrument and intelligent security system and other products have been more and more appear in people's life. Can foreknow, in order to meet the people in a comfortable, convenient, safe living environment, design, application of the embedded information products will be rapid development.
As an important application of embedded information products, its use, design is faced with new challenges. On the one hand, people are more and more requirement of embedded products, stable and reliable, abundant function, high quality and inexpensive information products will become the first choice of the people. On the other hand, with the development of microelectronic technology, single-chip processor capabilities continue to improve, from 8 bit microcontroller first to 16, then the 32 bit single chip, function more powerful, execute faster, integration, accuracy is higher and higher, the application domain further expand. Can say, the performance of single chip has been able to meet the needs of modern people's higher requirements of the embedded information products. In order to the effective combination of the two, the software design method of embedded RTOS has replaced the previous former-background (super cycle) design method, has been paid more and more attention and application.
as before in the Linux operating system, breaking the Windows rule all the land situation, by the United States Jean Mr. J.Labrosse design and preparation of uC/OS-II (Micro C OS 2) also to the emergence of domestic RTOS applications by surprise. The biggest advantage of uC/OS-II and Linux, which is the source code of all the open, so that people in the application of it at the same time, we can understand clearly the implementation details of the internal, and can be transplanted and modified according to their own needs. Especially important is uC/OS-II after 8 years of development, has been successfully applied in many industries, to ensure the practicality and reliability. It has changed the attitude of people in the use of the RTOS, to reduce the economic concerns, for domestic RTOS research, promotion, application will play an important role in promoting. UC/OS-II uses a micro kernel design, the use of C language, the pursuit of flexibility, configurability, clipping, expandable, transplantable. Needs to be emphasized is the uC/OS-II adopted a strict priority preemptive scheduling scheme. In the create task, according to the importance of the task assigned a different priority to each task. Task scheduling, the first implementation of the high priority task, and then in accordance with the priority from high to low task execution. If in a mission, to stimulate a higher priority task, the task is finished, the task scheduler to implement high priority task scheduling is excited, rather than sequential execution.
Transplantation and application of
below uC/OS-II in TI's MSP430F148 chip to study some problems of RTOS may be encountered in the realization of singlechip.
1 MSP430 series microcontroller
MSP430 Series MCU is composed of 16 bit single chip developed by TI company. Its outstanding characteristic is low power, very suitable for various power requirements low. There are a number of series and types, respectively, by some of the basic functional modules according to different combination and application of target. Is a typical application of flowmeter, intelligent instruments, medical equipment and security system etc.. Due to its high performance / price ratio, have been widely used.
MSP430F148 is MSP430F14x/13x MCU TI recently launched in a. Relative to other chip MSP430 series, the main features are as follows:
ultra low power consumption. Because the built-in flash memory, extremely low power consumption and therefore, power natural loss less than the battery when not in use by the consumption of MSP430F14x/13x Series in the standby mode. Under normal working conditions, if the voltage is 2.2 V, the typical current consumption of only 250uA/MIPS, the operating current standby mode to just below 1uA.
execution speed. MSP430F13x/14x series operating voltage range of 1.8~3.6 to V, the performance of up to 8 MIPS.
storage capacity. MSP430F148 48 KB Flash with ROM and 2 KB RAM. RAM space is the biggest in the MSP430 series, basically meets the need of running RTOS.
high performance A/D. 1 with 8 external channel 12 bit high performance A/D converter contains. The use of automatic scanning function built-in chip, A/D converter can not require the central processor assistance and work independently.
high integration. The device also comprises 1 independent watchdog, the 2 PWM timer (PWM), 1 comparators, 2 USART ports and a 48 input / output pins and other parts.
online support is strong. The MSP430F13x/14x series can be composed of MSP-FET430P140 flash simulation tool (FET) to provide support. The FET is a complete integrated development environment, including source code debugger, simulator, assembler / linker, C compiler, 2 kinds of evaluation chip, the target board, JTAG interface and programming unit.
from the above introduction can see, MSP430F148 is a low-end microcontroller, only have the basic conditions for running RTOS, so some of the meeting to run on top of it RTOS problem, is the representative for the general microcontroller.