• Complain

Warren Gay - Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC

Here you can read online Warren Gay - Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2018, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Warren Gay Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC
  • Book:
    Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2018
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Using FreeRTOS and libopencm3 instead of the Arduino software environment, this book will help you develop multi-tasking applications that go beyond Arduino norms. In addition to the usual peripherals found in the typical Arduino device, the STM32 device includes a USB controller, RTC (Real Time Clock), DMA (Direct Memory Access controller), CAN bus and more.

Each chapter contains clear explanations of the STM32 hardware capabilities to help get you started with the device, including GPIO and several other ST Microelectronics peripherals like USB and CAN bus controller. Youll learn how to download and set up the libopencm3 + FreeRTOS development environment, using GCC. With everything set up, youll leverage FreeRTOS to create tasks, queues, and mutexes. Youll also learn to work with the I2C bus to add GPIO using the PCF8574 chip. And how to create PWM output for RC control using hardware timers.

Youll be introduced to new concepts that are necessary to master the STM32, such as how to extend code with GCC overlays using an external Winbond W25Q32 flash chip. Your knowledge is tested at the end of each chapter with exercises. Upon completing this book, youll be ready to work with any of the devices in the STM32 family.

  • *

Beginning STM32 provides the professional, student, or hobbyist a way to learn about ARM without costing an arm!

What Youll Learn

  • Initialize and use the libopencm3 drivers and handle interrupts

  • Use DMA to drive a SPI based OLED displaying an analog meter

  • Read PWM from an RC control using hardware timers

Who This Book Is For


Experienced embedded engineers, students, hobbyists and makers wishing to explore the ARM architecture, going beyond Arduino limits.

Warren Gay: author's other books


Who wrote Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC? Find out the surname, the name of the author of the book and a list of all author's works by series.

Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Warren Gay 2018
Warren Gay Beginning STM32
1. Introduction
Warren Gay 1
(1)
St. Catharines, Ontario, Canada
There is considerable interest in the ARM Cortex platform today because ARM devices are found everywhere. Units containing ARM devices range from the small microcontroller embedded systems to cellphones and larger servers running Linux. Soon, ARM will also be present in higher numbers in the datacenter. These are all good reasons to become familiar with ARM technology.
With the technology ranging from microcontrollers to full servers, the question naturally arises: Why study embedded device programming? Why not focus on end-user systems running Linux, like the Raspberry Pi?
The simple answer is that embedded systems perform well in scenarios that are awkward for larger systems. They are frequently used to interface with the physical world. They go between the physical world and a desktop system, for example. The humble keyboard uses a dedicated MCU (microcontroller unit ) to scan key switches of the keyboard and report key-press events to the desktop system. This not only reduces the amount of wiring necessary but also frees the main CPU from expending its high-performance computing on the simple task of noticing key-press events.
Other applications include embedded systems throughout a factory floor to monitor temperature, security, and fire detection. It makes little sense to use a complete desktop system for this type of purpose. Stand-alone embedded systems save money and boot instantly. Finally, the MCUs small size makes it the only choice in flying drones where weight is a critical factor.
The development of embedded systems traditionally required the resources of two disciplines:
  • Hardware engineer
  • Software developer
Frequently, one person is assigned the task of designing the end product. Hardware engineers specialize in the design of the electronic circuits involved, but eventually the product requires software. This can be a challenge because software people generally lack the electronics know-how while the engineers often lack the software expertise. Because of reduced budgets and delivery times, the electronics engineer often becomes the software engineer as well.
There is no disadvantage to one persons performing both design aspects as long as the necessary skills are present. Whether youre an electronics engineer, software developer, hobbyist, or maker, there is nothing like real, down-to-earth practice to get you going. That is what this book is all about.
STM32F103C8T6
The device chosen for this book is the STMicroelectronics STM32F103C8T6. This part number is a mouthful, so lets break it down:
  • STM32 (STMicroelectronics platform)
  • F1 (device family)
  • 03 (subdivision of the device family)
  • C8T6 (physical manifestation affecting amount of SRAM, flash memory, and so on)
As the platform name implies, these devices are based upon a 32-bit path and are considerably more powerful than 8-bit devices as a result.
The F103 is one branch (F1 + 03) of the STM32 platform. This subdivision decides the CPU and peripheral capabilities of the device.
Finally, the C8T6 suffix further defines the capabilities of the device, like the memory capacity and clock speeds.
The STM32F103C8T6 device was chosen for this book because of the following factors :
  • very low cost (as low as $2 US on eBay)
  • availability (eBay, Amazon, AliExpress, etc.)
  • advanced capability
  • form factor
The STM32F103C8T6 is likely to remain the lowest-cost way for students and hobbyists alike to explore the ARM Cortex-M3 platform for quite some time. The device is readily available and is extremely capable. Finally, the form factor of the small PCB allows header strips to be soldered to the edges and plugged into a breadboard . Breadboards are the most convenient way to perform a wide array of experiments.
The MCU on a blue PCB (Figure ) is affectionately known as the Blue Pill , inspired by the movie The Matrix . There are some older PCBs that were red in color and were referred to as the Red Pill . There are still others, which are black and are known as the Black Pill . In this book, Ill be assuming you have the Blue Pill model. Apart from some USB deficiencies, there should be little other difference between it and the other models.
Figure 1-1 The STM32F103C8T6 PCB printed circuit board with the header strips - photo 1
Figure 1-1
The STM32F103C8T6 PCB (printed circuit board) with the header strips soldered in, often referred to as the blue pill
Low cost has another advantageit allows you to own several devices for projects involving CAN communications , for example. This book explores CAN communication using three devices connected by a common bus. Low cost means not being left out on a student budget.
The peripheral support of the STM32F103 is simply amazing when you consider its price. Peripherals included consist of:
  • 4 x 16-bit GPIO Ports (most are 5-volt tolerant)
  • 3 x USART (Universal Synchronous/Asynchronous Receiver/Transmitter)
  • 2 x I2C controllers
  • 2 x SPI controllers
  • 2 x ADC (Analog Digital Converter)
  • 2 x DMA (Direct Memory Address controllers)
  • 4 x timers
  • watch dog timers
  • 1 x USB controller
  • 1 x CAN controller
  • 1 x CRC generator
  • 20K static RAM
  • 64K (or 128K) FLASH memory
  • ARM Cortex M3 CPU, max 72 MHz clock
There are some restrictions, however. For example, the USB and CAN controllers cannot operate at the same time. Other peripherals may conflict over the I/O pins used. Most pin conflicts are managed through the AFIO (Alternate Function Input Output ) configuration, allowing different pins to be used for a peripherals function.
In the peripheral configuration, several separate clocks can be individually enabled to tailor power usage. The advanced capability of this MCU makes it suitable for study. What you learn about the STM32F103 family can be leveraged later in more advanced offerings like the STM32F407.
The flash memory is officially listed at 64K bytes, but you may find that it supports 128K. This is covered in Chapter and permits good-sized applications to be flashed to the device.
FreeRTOS
Unlike the popular AVR family of chips (now owned by Microchip), the STM32F103 family has enough SRAM (static RAM) to comfortably run FreeRTOS ( freertos.org ). Having access to a RTOS (real-time operating system ) provides several advantages, including
  • preemptive multitasking;
  • queues;
  • mutexes and semaphores; and
  • software timers.
Of particular advantage is the multitasking capability. This eases the burden of software design considerably. Many advanced Arduino projects are burdened by the use of state machines with an event loop model . Each time through the loop, the software must poll whether an event has occurred and determine if it is time for some action. This requires management of state variables, which quickly becomes complex and leads to programming errors. Conversely, preemptive multitasking provides separate control tasks that clearly implement their independent functions. This is a proven form of software abstraction.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC»

Look at similar books to Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC»

Discussion, reviews of the book Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.