Mastering Microcontroller With Peripheral Driver Development
(MCU1) Learn bare metal driver development using Embedded C: Writing drivers for STM32 GPIO,I2C,SPI,USART from scratch
Last updated 2022-01-10 | 4.5
- Understand Right ways of Handling and programming MCU Peripherals- Develop Peripheral drivers for your Microcontroller
- Understand complete Driver Development steps right from scratch for GPIO
- SPI
- I2C and USART.
What you'll learn
* Requirements
* Basic knowledge of C programming* If you are completely new to MCU and C programming language then you are advised to finish our "Embedded C" course for absolute beginners first
Description
- Understand Right ways of Handling and programming MCU Peripherals
- Develop Peripheral drivers for your Microcontroller
- Understand complete Driver Development steps right from scratch for GPIO,SPI,I2C and USART.
- Learn Writing peripheral driver headers, prototyping APIs and implementation
- Explore MCU data sheets, Reference manuals, start-up Codes to get things done
- Learn Right ways of handling/configuring Interrupts for various peripherals
- Learn about Peripheral IRQs/Vector table/NVIC interfaces and many
- Learn about Configuration/status/Control registers of various Peripherals
- Demystifying behind the scene working details of SPI,I2C,GPIOs,USART etc.
- Explore hidden secretes of MCU bus interfaces, clock sources, MCU clock configurations, etc.
- Understand right ways of enabling/configuring peripheral clocks/serial clocks/baud rates of various serial protocols
- Learn about MCUs AHB, APB bus protocols
- Learn about different MCU clocks like HCLK, PCLK, PLL,etc
- Learn to capture/decode/analyze traces of serial protocols on Logic analyzer
- Learn about Quick ways of debugging peripheral issues with case studies
Course content
76 sections • 285 lectures
About the instructor Preview 00:17
Important Note Preview 00:43
Source Code and Slides Preview 00:02
Rating and Review Preview 00:32
About MCU Development board Preview 03:27
Hardware/Software Requirements Preview 00:05
Downloading STM32CUBEIDE Preview 01:39
Installation-Windows Preview 00:43
Installation-Ubuntu Preview 02:01
Embedded Target Preview 02:48
Documents required Preview 02:44
Creating Hello-World project Preview 09:53
SWV working principle Preview 09:07
Testing Hello-World through SWV Preview 05:32
OpenOCD and Semihosting to use printf Preview 05:59
Debugging options Preview 04:55
Single stepping Preview 10:18
Disassembly and Register windows Preview 03:48
Breakpoints Preview 06:17
Expression and variable windows Preview 04:32
Memory browser windows Preview 07:56
Call stack and fault analyzers Preview 07:25
Data watch-points Preview 04:32
SFR windows Preview 04:42
Other basic features of IDE Preview 04:59
Understanding Memory Map of the MCU: Part 1 Preview 05:10
Understanding Memory Map of the MCU: Part 2 Preview 03:04
Understanding Memory Map of the MCU: Part 3 Preview 08:31
Test your understanding
MCU Bus Interfaces Explanation Part 1: I-Code/D-Code/S-Bus Preview 13:21
MCU Bus Interfaces Explanation Part 2: AHB/APB1/APB2 Preview 08:13
MCU Bus Interfaces Explanation Part 3: Q/A session Preview 11:26
Understanding MCU Bus Matrix Preview 06:19
Test your understanding
For STM32F4O7xx discovery, the width of the system bus is ____
Understanding MCU Clocking System:Part1 Preview 05:57
Understanding MCU clock sources and HSE Preview 11:04
HSI and RCC registers Preview 11:24
Peripheral clock configuration Preview 12:39
Exercise : HSI measurements Preview 08:34
About USB logic analyzer Preview 05:33
Code implementation Preview 12:22
Exercise : HSE measurements Preview 08:39
Understanding MCU Vector Table Preview 24:11
Understanding MCU interrupt Design , NVIC, Interrupt handling: Part 1 Preview 10:03
Understanding MCU interrupt Design , NVIC, Interrupt handling: Part 2 Preview 06:33
Understanding MCU interrupt Design , NVIC, Interrupt handling: Part 3 Preview 13:31
Importance of "Volatile" Keyword: Part-1 Preview 09:53
Importance of "Volatile" Keyword-Part 2 Preview 07:42
GPIO pin and GPIO port Preview 02:21
A quick explanation about GPIO pin and GPIO Port of a Microcontroller to get started.
GPIO behind the scene Preview 03:00
Ahh. This is a very important lecture, where You will come to know, whats the behind the scene implementation of an I/O pin in the MCU. Understanding behind the scene implementation is very important to know how GPIOs actually behave.
you will also come know I/O input and output mode, input and output mode buffers associated with an I/O pin which gets activated as per the mode selection
GPIO input mode with high impedance state Preview 01:13
In this Lecture I will explain about GPIO input mode with HI-Z or high impedance state configuration .
you will understand , what exactly HI-Z state is !
GPIO input mode with pull-up/down state Preview 01:15
In this lecture, You will understand GPIO input mode with pull up or pull down state.
you will come to know about pull up and pull down resistors and whats their importance.
GPIO output mode with open drain state Preview 05:53
This is a very important lecture where you will come to know, what exactly is open drain state, What is its advantages , How to use open drain configuration in a practical scenarios like Driving LEDs or I2C bus implementation.
I will also show you , how to make use of open drain output mods by using internal or external pull-up resistors.
GPIO output mode with push pull state Preview 02:47
In this lecture you will come to know GPIO output mode with push pull configuraion.
I will talk about push pull configuration in detail and some practical use cases like driving LEDs from push pull state.
Optimizing I/O power consumption Preview 03:11
if you ever heard that by keeping pin floating you may be wasting power through I/Os, In this lecture lets see
how current gets leaked out through I/O pin during different configurations and how to solve it
Test your understanding
GPIO programming structure Preview 02:44
In this lecture, in general i will talk about typical gpio programming structure in a Microcontroller.
Exploring GPIO PORT and pins of STM32F4xx Discovery board Preview 00:57
Lets see how many GPIO ports our MCU supports and How many ports are brought out on the development board.
GPIO Mode register(used to set mode for a pin) Preview 05:39
Input configuration of a Microcontroller's GPIO Pin Preview 11:42
Output Configuration of a GPIO Pin in Push pull mode Preview 02:39
Output Configuration of a GPIO Pin in open drain mode Preview 04:57
Input stage of a GPIO pin during output configuration Preview 00:34
Alternate functionality Configuration of a GPIO pin Preview 02:45
GPIO out put type register explanation Preview 01:06
In this lecture lets explore about GPIO Output Type register which is used to select the output type for an I/O pin. I will walk you through this register by taking you to the technical reference manual of the MCU.
GPIO output speed register and its applicability Preview 05:39
In this lecture you will come know the significance of GPIO speed register which controls the I/O transition .
All modern day MCUs has this register to control the speed parameter .
GPIO Pull up and Pull down register Preview 00:58
GPIO input data register Preview 01:05
GPIO output data register and summary of various modes discussed Preview 02:30
Alternate functionality settings of a GPIO pin with example : Part 1 Preview 04:44
Alternate functionality settings of a GPIO pin with example : Part 1 Preview 05:37
Request for Review Preview 00:21
Find Out I/O Alt Functionality
Test your understanding
Test your understanding
Enabling and disabling GPIO peripheral clock Preview 01:25
GPIO driver development overview Preview 03:49
MCU Specific header file and its contents Preview 02:26
New project creation and creating MCU specific headerfile Preview 04:26
Include path settings Preview 02:17
Important note on IDE usage Preview 00:19
Writing base address C macros for MCU's embedded memories : Part 1 Preview 03:38
Writing base address C macros for MCU's embedded memories : Part 2 Preview 02:13
Defining base addresses of different bus domains Preview 06:00
Defining base addresses of AHB1 Peripherals Preview 03:02
Defining base addresses of APB1 and APB2 Peripherals Preview 01:52
Defining base addresses conclusion Preview 04:48
Address of peripheral registers Preview 01:50
Structuring peripheral registers Preview 13:04
Peripheral definition macros Preview 04:04
Writing peripheral clock enable and disable C Macros Preview 07:53
Project include settings and build Preview 02:59
Creating GPIO driver header and source file Preview 01:47
Defining GPIO handle and configuration structure Preview 05:15
Driver API requirements and adding API prototypes Preview 06:47
Driver API input parameters and return types Preview 09:00
Driver empty API implementation and documentation Preview 03:03
Implementation of GPIO peripheral clock control API Preview 02:20
Writing user configurable macros Preview 07:40
Implementation of GPIO init API Preview 06:30
Implementation of GPIO init API contd. Preview 02:22
Configuring Alternate function registers Preview 08:53
GPIO de-init API implementation Preview 04:49
Implementation of GPIO input port read and input pin read APIs Preview 04:04
Implementation of GPIO output port write and output pin write APIs Preview 02:20
Implementation of GPIO pin toggle API Preview 01:11
Exercise : LED toggling with PUSH PULL configuration Preview 11:15
Exercise : LED toggling with OPEN DRAIN configuration Preview 06:13
Exercise : Handling on board LED and Button Preview 11:13
Exercise : Connecting external button and circuit explanation Preview 09:45
Exercise : Testing button interface Preview 02:45
Exercise : Button interrupt introduction Preview 01:13
GPIO pin Interrupt configuration coding : Part 1 Preview 06:54
GPIO pin Interrupt configuration coding : Part 2 Preview 05:11
GPIO pin Interrupt configuration coding : Part 3 Preview 01:06
GPIO pin Interrupt configuration coding : Part 4 Preview 15:01
GPIO pin Interrupt configuration coding : Part 5 Preview 09:41
GPIO pin Interrupt configuration coding : Part 6 Preview 10:19
GPIO pin Interrupt configuration coding : Part 7 Preview 12:12
Exercise : External button interrupt implementation Preview 21:30
Exercise : Debugging the application : Part 1 Preview 08:59
Exercise : Debugging the application : Part 2 Preview 03:55
STM32 Pin specifications Preview 14:40
Pin current characteristics Preview 12:21
Logic levels Preview 16:55
Introduction to SPI Bus Preview 06:20
SPI comparison with other protocols Preview 04:08
Importance of SPI slave select pin Preview 02:23
SPI Minimum bus configuration Preview 02:23
SPI behind the scene data communication principle Preview 04:02
SPI bus configuration discussion : full duplex, half duplex and simplex Preview 05:41
SPI functional block diagram explanation Preview 06:49
NSS settings in STM32 master and slave modes Preview 02:58
STM32 SPI hardware and software slave managements Preview 06:27
SPI CPOL and CPHA discussion Preview 11:54
SPI CPOL and CPHA waveform example Preview 07:42
SPI peripherals of your Microcontroller Preview 01:27
SPI Serial clock frequency Preview 05:06
SPI API requirements and configuration items Preview 07:06
updating MCU specific header file with SPI related details Preview 01:42
SPI adding API prototypes to driver header file Preview 05:17
Implementation of SPI peripheral clock control API Preview 04:19
SPI user configuration options writing and register bit definition macros Preview 18:17
Implementation of SPI init API : Part 1 Preview 03:16
Implementation of SPI init API : Part 2 Preview 04:22
Implementation of SPI send data API : Part 1 Preview 07:32
Implementation of SPI send data API : Part 2 Preview 04:48
Implementation of SPI send data API : Part 3 Preview 05:41
Implementation of SPI send data API : Part 4 Preview 01:01
Exercise to test SPI Send Data API Preview 02:03
Finding out microcontroller pins to communicate over SPI2 Preview 04:14
Exercise : Code implementation : Part 1 Preview 04:15
Exercise : Code implementation : Part 2 Preview 07:22
Exercise : Code implementation : Part 3 Preview 05:30
Exercise : Testing Preview 14:55
Exercise : Communicating with Arduino slave Preview 12:24
Exercise : Coding Part 1 Preview 06:56
Exercise : Coding Part 2 Preview 03:08
Exercise : Coding Part 3 Preview 03:45
Exercise : Testing Preview 07:06
Implementation of SPI data receive API : Part 1 Preview 02:05
Implementation of SPI data receive API : Part 2 Preview 01:50
Exercise : SPI command and response based communication Preview 08:18
Exercise : Coding Part 1 Preview 10:07
Exercise : Coding Part 2 Preview 09:05
Exercise : Coding Part 3 Preview 13:37
SPI peripheral interrupting the processor Preview 06:46
SPI interrupt mode API implementation and changes to handle structure Preview 05:04
SPI send data with interrupt API implementation Preview 04:35
SPI receive data with interrupt implementation Preview 01:35
SPI : Handling of interrupts Preview 04:10
SPI IRQ handler implementation : Part 1 Preview 07:38
SPI IRQ handler implementation : Part 2 Preview 09:16
SPI IRQ handler implementation : Part 3 Preview 09:40
Exercise Preview 15:50
Common problems in SPI and Debugging Tips Preview 06:14
In this lecture , I will explain some of the common problems related to SPI protocol and i will share some of the debugging Tips.
Lets discuss some of the case studies and debugging tips that helps to resolve the issues