Preface

A microcontroller is a single-chip microprocessor system which contains data and program memory, serial and parallel I/O, timers, external and internal interrupts, all integrated into a single chip that can be purchased for as little as $2.00. About 40% of microcontroller applications are in office automation, such as PCs, laser printers, fax machines, intelligent telephones, and so forth. About one-third of microcontrollers are found in consumer electronic goods. Products like CD and DVD players, hi-fi equipment, video games, washing machines, cookers, and so on fall into this category. The communications market, automotive market, and the military share the rest of the application areas.

Microcontrollers have traditionally been programmed using the assembly language of the target processor. Although the assembly language is fast, it has the disadvantages that it is difficult to develop and maintain large projects using the assembly language. Additionally, microcontrollers from different manufacturers have different assembly language instruction sets which makes it very time consuming for the programmers to learn new assembly languages every time a different microcontroller is to be used. The assembly code developed for one type of microcontroller cannot be ported to another type of microcontroller. Nowadays microcontrollers are programmed using high-level languages, such as C, C++, Pascal, or Basic. Perhaps the biggest advantage of using a high-level language is that the developed code can easily be ported to other types of microcontrollers. Additionally, it is easier to maintain a program developed using a high-level programming language.

There are many different types of microcontrollers available from many manufacturers. Most manufacturers offer development kits (or development boards), which are invaluable tools during the early stages of project development. In this book the Clicker 2 for STM32 development board is used. This board is based on the STM32F407 type ARM Cortex-M4 processor that can operate at up to 168MHz. The highly popular mikroC Pro for ARM compiler and IDE is used for software development.

The topic of this book is FreeRTOS kernel and multitasking. Multitasking has become one of the important topics in microcontroller-based systems, namely in automation applications. As the complexity of the projects grow, more functionality is demanded from the projects and such projects require the use of several inter-related tasks running on the same processor and sharing the CPU in order to implement the required operations. As a result of this, the importance of multitasking operation in microcontroller-based applications has been growing steadily over the last several years and many complex automation projects nowadays make use of some form of a multitasking kernel. In this book the FreeRTOS multitasking kernel is used in the projects. FreeRTOS is a market leading real time multitasking kernel with millions of deployments in all market sectors. FreeRTOS is free of charge and is fully documented and supported. It is available to run on many hardware and software platforms, including the ARM processors and the mikroC Pro for ARM compiler and IDE. FreeRTOS is so popular that in 2018 it was downloaded every 175 seconds (www.freertos.org) and it came top in class in every EETimes Embedded Market Survey since 2011.

This book is project based and its main aim has been to teach the basic features and API functions of the FreeRTOS kernel. Many fully tested projects are given in the book using FreeRTOS in multitasking applications. Each project is described fully and in detail, and the complete program listings are given for each project. Readers should be able to use the projects as they are, or modify them to suit to their own needs. The following sub-headings are used while describing each project:

  • Description of the project
  • Aim of the project
  • Background (if applicable)
  • Block diagram
  • Circuit diagram
  • Program listing
  • Suggestions for future work (if applicable)

The operation of some of the complex projects have been described using the Project Description Language (PDL), which makes it easy to understand the programs before they are developed.

Knowledge of the C-programming language will be useful to the readers. Also, familiarity with at least one microcontroller development board (preferably with an ARM processor) will be an advantage. The knowledge of assembly language programming is not required because all the projects in the book are based on using the C language.

This book is written for students, for practicing engineers, and for hobbyists interested in developing multitasking microcontroller-based real time projects using the ARM family of microcontrollers. Attempt has been made to include as many projects as possible, limited only by the size of the book.

Although the Clicker 2 for STM32 microcontroller development board and the STM32F407 type ARM processor are used in this book, readers should find it easy to use other types of development boards and other types of ARM processors.

FreeRTOS is documented and supported fully by its developers. Interested readers can obtain detailed information on FreeRTOS features and API functions from the following Internet-based sources:

Mastering the FreeRTOS Real Time Kernel: A Hands-On Tutorial Guide, by Richard Barry, web site:

https://www.freertos.org/wp-content/uploads/2018/07/161204_Mastering_the_FreeRTOS_Real_Time_Kernel-A_Hands-On_Tutorial_Guide.pdf

or

The FreeRTOS Reference Manual: API Functions and Configuration Options, web site:

https://www.freertos.org/wp-content/uploads/2018/07/FreeRTOS_Reference_Manual_V10.0.0.pdf

or

FreeRTOS web site:

www.freertos.org

Dogan Ibrahim

London, 2020

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.35.5