Embedded Systems Bare-Metal Programming Ground Up (STM32)

Embedded Systems Bare-Metal Programming Ground Up (STM32)

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 24h 36m | 11.4 GB

No Libraries used, Professional CMSIS Standard, ARM Cortex, ADC,UART,TIMERS, DMA,SPI,I2C,RTC,GPIO etc.

Are you tired of Copying and Pasting code you don’t understand?

With a programming based approach, this course is designed to give you a solid foundation in bare-metal firmware development for ARM-based microcontrollers . The goal of this course is to teach you how to navigate the microcontroller reference manual and datasheet to extract the right information to professionally build peripheral drivers and firmware. To achieve this goal, no libraries are used in this course, purely bare-metal embedded-c and register manipulations.

Still keeping it simple, this course comes in different ARM Cortex-M development boards so that students can put the techniques to practice using an ARM Cortex-M development board of their choice. This version of the course uses the STMicroelectronics STM32F4-NUCLEO which has an ARM Cortex-M4 microcontoller.

So with that understood, let me tell you…

Exactly What You’re Getting

This is dramatically different from any course you have ever taken because it’s more of a professional hands-on “field guide” to stm32 bare metal firmware development.
The reason why is because there’s no fluff or filler. It immediately gets down to the actual subject, showing you exactly what to do, how to do it, and why.

Plus, it’s easy.

And you’ll immediately “get” the entire mythology I personally use to build firmware for consumer devices in my professional life.

If at least one of the following applies to you then keep reading if not then simply skip this course:

” Escape From ”

  • Copying/Pasting code you don’t understand
  • Using third party libraries and header files like HAL, LL and StdPeriph
  • Experiencing bugs you don’t understand
  • Being afraid of technical documentations like the reference manual and datasheet of the chip
  • Imposter syndrome

” Arrive At ”

  • Building every single line of code from scratch by writing to the microcontroller’s memory space directly.
  • Using No third party libraries or header files
  • Understanding and writing every single line of code yourself- no Copy/Paste
  • Using the debugger effectively to analyze and resolve any bugs
  • Developing proficiency in your embedded development skills and confidently take the next steps

So like I said, there’s more than just getting each piece of code to work.

Here’s an overview of what you’re getting…

Analyzing the chip documentations:

Before developing the firmware for any chip you have to learn how to read the documentation provided by the chip manufacturer.

Defining Peripheral address

All components on the microcontroller have an address range. To write to a component or read from a component you need to locate its address range in the documentation and properly define the addresses in your code.

Creating registers from the address:

The addresses in the address range of a component represent the registers of that component. To access these registers you have effectively typecast the addresses.

Understanding CMSIS:

Cortex-Microcontroller Interface Standard (CMSIS)CMSIS is a standard developed by Arm for all Cortex-Microcontrollers. This is the standard used in professional firmware development

But it gets better because you’re also getting…

Deep Lessons on Developing Peripheral Drivers

You will learn how to develop bare-metal drivers for the following peripherals :

  • Analog-to-Digital Converter (ADC)
  • Serial Peripheral Interface (SPI)
  • Inter-Integrated Circuit (I2C)
  • Direct Memory Access (DMA)
  • Nested Vector Interrupt Controller (NVIC)
  • General Purpose Timers (TIM)
  • System Tick Timer (SysTick)
  • General Purpose Input/Output (GPIO)

Specially Designed For People Who Hate Copy/Paste

Listen. If you don’t like “Copy/Paste” you’re not alone. I can’t stand it either. I’d literally rather have a piece of code that I wrote from scratch that doesn’t work than someone else’s working code I copied and pasted.

And that’s why I’ve spent months designing and recording this course in which I show you how to locate every single register used and the meaning of every hexadecimal value written into the register.

What you’ll learn

  • Write firmware using only bare-metal embedded-c
  • Understand the Cortex-M Architecture
  • Write Analog-to-Digital Converter (ADC) drivers using bare-metal embedded-c
  • Write PWM drivers using bare-metal embedded-c
  • Write UART drivers using bare-metal embedded-c
  • Write TIMER drivers using bare-metal embedded-c
  • Write Interrupt drivers using bare-metal embedded-c
  • Write SPI drivers using bare-metal embedded-c
  • Write I2C drivers using bare-metal embedded-c
  • Master the ARM-Cortex CMSIS standard
  • Write DMA drivers using bare-metal embedded-c
  • Build every single line of code from scratch by writing to the microcontroller’s memory space directly.
  • Use No third party libraries or header files
  • Understand and write every single line of code yourself- no Copy/Paste
  • Use the debugger effectively to analyze and resolve any bugs
  • Develop proficiency in your embedded development skills and confidently take the next steps
  • Define addresses for the different peripherals
  • Analyze the chip documentation
  • Create registers from the addresses
Table of Contents

Getting Started – Constructing Peripheral Registers from Memory Addresses
1 Downloading our Integrated Development Environment (IDE)
2 Installing our Integrated Development Environment (IDE)
3 Getting the right Documentation for Bare-Metal Development
4 Coding Locating the Ports and Pins of Components on the Nucleo board
5 Coding Defining Addresses of Modules using information from the Documentation
6 Coding Creating required Registers using Information from Documentation
7 Coding Configuring Pins using the Registers we Created
8 Coding Creating Registers from Structure Members
9 Notice

General Purpose InputOutput(GPIO)
10 Overview of ARM Cortex-M General Purpose InputOutput Module
11 Coding Developing the GPIO Output Driver
12 Coding Controlling GPIO Outputs using the Bit SetReset Register (BSRR)
13 Coding Developing the GPIO Input Driver

Universal Asynchronous Receiver-Transmitter(UART)
14 Overview of the UART Protocol
15 Coding Developing the UART Transmitter Driver
16 Coding Testing the UART Transmitter Driver
17 Coding Retargeting printf
18 Coding Making the Driver more Modular
19 Coding Developing the UART Receiver Driver
20 Coding Testing the UART Receiver Driver

Analog to Digital Conversion (ADC)
21 Introduction to Analog to Digital Conversion
22 Understanding ADC Independents Modes
23 Coding Developing the ADC Single Conversion Driver
24 Coding Developing the ADC Continuous Conversion Driver

The System Tick (SysTick) Timer
25 Overview of the System Tick Timer
26 Coding Developing the System Tick Timer Driver

General Purpose Timers
27 Overview of General Purpose Timers
28 Commonly used Timer registers
29 Coding Developing the General Purpose Timer Driver
30 Coding Developing the Timer Output Compare Driver
31 Coding Developing the Timer Input Capture Driver

Interrupt Programming
32 Introduction to Interrupts
33 Coding Developing the GPIO Interrupt Driver
34 Coding Testing the GPIO Interrupt Driver
35 Coding Developing the UART Receiver Interrupt Driver
36 Coding Developing the ADC Interrupt Driver
37 Coding Developing the Systick Interrupt Driver
38 Coding Developing the Timer Interrupt Driver

Direct Memory Access (DMA) Driver Development
39 Overview of the Direct Memory Access (DMA) Module
40 Coding Developing the UART Transmitter DMA Driver Pt.1
41 Coding Developing the UART Transmitter DMA Driver Pt.2
42 Coding Testing the UART Transmitter DMA Driver

Inter-Integrated Circuit (I2C)
43 Introduction to I2C
44 Coding Implementing the I2C Init function
45 Coding Implementing the I2C Byte Read function
46 Coding Implementing the I2C Burst Read function
47 Coding Implementing the I2C Burst Write function
48 Coding Configuring the ADXL345 Accelerometer using the I2C driver
49 Coding Testing the ADXL345 Accelerometer using the I2C driver

Serial Peripheral Interface (SPI)
50 Introduction to Serial Peripheral Interface (SPI)
51 Coding Implementing the SPI GPIO Initialization function
52 Coding Configuring the SPI Parameters
53 Coding Implementing the SPI Transmit
54 Coding Implementing the SPI Receive
55 Coding Configuring the ADXL345 Accelerometer using the SPI Driver
56 Coding Testing our ADXL345 Driver

Start of Old Version of the Course – Introduction
57 Introduction

Set Up
58 Download Keil uVision 5
59 Installing Keil uVision 5
60 Notice
61 Installing Packs
62 Changing the Compiler

General Purpose InputOutput(GPIO)
63 Overview of ARM Cortex-M General Purpose InputOutput Module
64 Coding Developing GPIO Driver Using Information from the Datasheet
65 Understanding the BSRR Register
66 Coding Controlling GPIO using the BSRR Register
67 Coding Reading GPIO Inputs
68 Notice

Writing Bare-Metal C Code with STM32CubeIDE
69 Notice
70 Coding Writing a GPIO Driver from Scratch (PART I)
71 Coding Writing a GPIO Driver from Scratch (PART II)

Universal Asynchronous Receiver-Transmitter(UART)
72 Overview of the UART Protocol
73 Commonly used UART registers
74 Coding Developing the UART Driver Using Information from the Datasheet
75 Further discussion on UART Alternate Function configuration
76 Coding Receiving Data with the UART
77 Coding Two-way UART Communication

System Tick and General Purpose Timers
78 Overview of the System Tick Timer
79 Overview of General Purpose Timers
80 Commonly used Timer registers
81 Coding Developing the System Tick Timer Driver
82 Further discussion on System Tick Registers
83 Coding Creating a Delay Function using the System Tick Timer
84 Coding Developing the General Purpose Timer (GPTM) Driver
85 Coding Configuring the General Purpose Timer for Output Compare
86 Coding Configuring the General Purpose Timer for Input Capture
87 Coding Input capture frequency measurement
88 Coding Configuring the General Purpose Timer for PWM Output

Interrupts Programming
89 Introduction to Interrupts
90 Understanding External Interrupts
91 Coding Developing the GPIO Interrupt Driver
92 Coding Working with Multiple GPIO Interrupts
93 Coding Developing the UART Interrupt Driver
94 Coding Developing the System Tick Interrupt Driver
95 Coding Developing the General Purpose Timer Interrupt Driver

Analog to Digital Conversion (ADC)
96 Introduction to Analog to Digital Conversion
97 Coding Developing the ADC Driver
98 Coding Reading the CPU Temperature with the ADC and Displaying it with the UART

Interfacing with a Liquid Crystal Display (LCD)
99 Coding Developing the Liquid Crystal Display (LCD) Driver
100 Coding Configuring the Liquid Crystal Display for 4-bit Data Mode

Inter-Integrated Circuit (I2C)
101 Introduction to I2C
102 Analyzing the DS1307 Realtime Clock
103 Coding Developing an I2C Driver

Serial Peripheral Interface (SPI)
104 Introduction to Serial Peripheral Interface (SPI)
105 Coding Developing a Simple SPI Driver
106 Coding Developing an SPI Driver for the ST7735 Graphics LCD (Part I)
107 Coding Developing an SPI Driver for the ST7735 Graphics LCD (Part II)
108 Coding Developing an SPI Driver for the ST7735 Graphics LCD (Part III)
109 Coding Developing an SPI Driver for the ST7735 Graphics LCD (Part IV)

ARM Design Philosophy and RISC Architecture
110 The RISC Design Philosohpy
111 The ARM Design Philosophy
112 Embedded Systems with ARM Processors
113 ARM Bus Technology and AMBA Bus Protocol
114 Memory
115 Peripherals
116 Von Nuemann and Harvard architecture
117 Cache and Tightly Couple Memory
118 Memory Management extensions
119 Cooprocessor extensions

The ARM Programmer’s Model
120 Data Types
121 Processor Modes
122 ARM7TDMI Registers
123 ARM7TDMI Vector Table
124 ARM Cortex-M Registers
125 ARM Cortex-M Vector Table
126 ARM Data Flow Model
127 The Pipeline
128 ARM Processor Family
129 ARM Cortex-A and Cortex-R
130 ARM Cortex-M

Setting Up Option 2 – STM32CubeIDE
131 Downloading CubeIDE
132 Setting Up STM32CubeIDE
133 Quick Notice
134 Installing Packages
135 Overview

Closing
136 Closing Remarks

Homepage