Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On RTOS with Microcontrollers

You're reading from   Hands-On RTOS with Microcontrollers Building real-time embedded systems using FreeRTOS, STM32 MCUs, and SEGGER debug tools

Arrow left icon
Product type Paperback
Published in May 2020
Publisher Packt
ISBN-13 9781838826734
Length 496 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Brian Amos Brian Amos
Author Profile Icon Brian Amos
Brian Amos
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Section 1: Introduction and RTOS Concepts
2. Introducing Real-Time Systems FREE CHAPTER 3. Understanding RTOS Tasks 4. Task Signaling and Communication Mechanisms 5. Section 2: Toolchain Setup
6. Selecting the Right MCU 7. Selecting an IDE 8. Debugging Tools for Real-Time Systems 9. Section 3: RTOS Application Examples
10. The FreeRTOS Scheduler 11. Protecting Data and Synchronizing Tasks 12. Intertask Communication 13. Section 4: Advanced RTOS Techniques
14. Drivers and ISRs 15. Sharing Hardware Peripherals across Tasks 16. Tips for Creating a Well-Abstracted Architecture 17. Creating Loose Coupling with Queues 18. Choosing an RTOS API 19. FreeRTOS Memory Management 20. Multi-Processor and Multi-Core Systems 21. Troubleshooting Tips and Next Steps 22. Assessments 23. Other Books You May Enjoy

To get the most out of this book

Every effort has been made to make working through the examples in this book as easy as possible for a very wide range of people. To get the most out of the book (by working through the examples), you'll need the following hardware:

  • A Windows, macOS, or Linux PC with internet access
  • An STM32 Nucleo-F767ZI development board
  • Two Micro-USB cables
  • Jumper wires—20 to 22 AWG (~0.65 mm) solid core wire

Detailed setup instructions for the different tools used are included in the chapters.

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Since this book targets programming low-level embedded systems, we'll be using C as the language of choice. Some knowledge of microcontrollers is assumed, as is the ability to read a datasheet. If you have a good understanding of the C language (or C++), then you should be comfortable reading this book – no previous RTOS knowledge is required. Since we'll be working with MCUs in an embedded system, there will be some occasional discussions on the hardware side as well, primarily dealing with features of MCUs and development boards. These topics will be covered in enough detail that someone with minimal hardware knowledge should be able to follow without too much difficulty. You should be comfortable interacting with and handling development hardware, although there isn't any actual assembly required.

Download the example code files

You can download the example code files for this book from your account at https://github.com/PacktPublishing/Hands-On-RTOS-with-Microcontrollers. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-RTOS-with-Microcontrollers. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "func1() is responsible for reading the value of a sensor and storing it in
the sensorReadings array"

A block of code is set as follows:

void func1( int16_t calOffset)
{
int16_t tempValue;
tempValue = readSensor();
tempValue = tempValue + calOffset;
sensorReadings[0] = tempValue;
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

/* ADC Config */
hnucleo_Adc.Instance = NUCLEO_ADCx;
/* (ClockPrescaler must not exceed 36MHz) */
hnucleo_Adc.Init.ClockPrescaler = ADC_CLOCKPRESCALER_PCLK_DIV4;
hnucleo_Adc.Init.Resolution = ADC_RESOLUTION12b;
hnucleo_Adc.Init.DataAlign = ADC_DATAALIGN_RIGHT;
hnucleo_Adc.Init.ContinuousConvMode = DISABLE;
hnucleo_Adc.Init.DiscontinuousConvMode = DISABLE;

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."

Warnings or important notes appear like this.
Tips and tricks appear like this.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime