Mastering Microcontroller and Embedded Driver Development

(MCU1) Learn bare metal driver development using Embedded C: Writing drivers for STM32 GPIO,I2C,SPI,USART from scratch

4.57 (10119 reviews)
Udemy
platform
English
language
Hardware
category
Mastering Microcontroller and Embedded Driver Development
59,224
students
28.5 hours
content
Apr 2024
last update
$89.99
regular price

What you will learn

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

Why take this course?

>> Your Search for an in-depth microcontroller programming course ends here !!<<<

Course code: MCU1

Learn bare-metal driver development using Embedded C : Writing drivers for STM32 GPIO,I2C, SPI,USART from scratch

English Subtitles/CCs are enabled for this course.

Update 6: videos are updated with the latest STM32CUBEIDE

Update 5: All drivers are developed in a live session with step-by-step coding and added stm32-Arduino communication exercises using SPI and I2C.

Update 4: Dedicated support team is assigned to address student's Q/A

Update 3: English Closed captions are fixed

Update 2  : Added Bus matrix / memory map /vector table /interrupt design discussion with code examples.

Update 1: Eclipse IDE setup for ARM Cortex M based MCUs added


The course is designed for beginners to advanced audiences.


Brief Description:

This course Demystifies the internal working of the Microcontroller and its Peripherals.

Coding for the Peripherals STEP-BY-STEP and Developing software drivers entirely from scratch by extracting maximum information from Datasheets, Reference manuals, specs, etc

Protocol Decoding Using logic analyzers, Debugging, Testing along with Hints and Tips.


Long Description:

Learning Embedded System Programming can be a challenge. Since it's a relatively complex field, there's no actual gold standard yet for how things are practiced, or taught, which can frustrate people who are just trying to learn new things and couldn't connect the dots.

This is the motivation behind creating this course to help engineers and students learn different aspects of embedded systems by providing high-quality advanced lectures at a relatively low price.


Master Behind the Scene working;

created this course because I believe your time is precious, and you shouldn't have to hunt around to get a practical foundation In Embedded System Programming. In this course, you will learn to write your peripheral driver for most commonly used peripherals such as GPIOs, I2C, SPI, USART, etc., and the exciting thing is that you will learn everything from scratch.

No 3rd party libraries!

No blind coding!

Write your driver APIs by dealing with the peripheral registers of the MCU!

Code and Implement APIs from scratch, diving into the datasheet and reference manual of the MCU. I will thoroughly explain how to extract the maximum information from datasheets, Technical Reference manuals to configure and handle peripherals. These techniques you can go and apply to any MCUs you have at your hand.

In this course, I will walk you through step-by-step procedures on configuring various Peripherals like GPIOs, SPI, USART, I2C by taking you into the reference manual and datasheet. We will develop a fully working driver code, interrupt handlers, sample application everything from scratch to understand the big picture.

In each lecture, I assure you that you will learn something new to use in your work or projects. You'll find yourself handling these peripherals with much more clarity. You will be able to speculate and debug the problem quickly. I'll show you tricks and tips to debug the most common issues using debugging tools such as logic analyzers.


This is not the Arduino style of programming:

I believe Arduino is for quick prototyping of projects/products but not for mastering the working of micro-controllers and their peripherals. Unlike Arduino programming, where you develop a quick solution and prototyping of products using third-party libraries, this course is entirely different. In this course, no 3rd party libraries are used. Everything we will code by referring to the technical reference manual of the MCU and will create our own library. The Power of this approach is that you can quickly speculate problems and debug like a pro when things go wrong in your project due to bugs. If one thing me and my students are good at is "debugging,." To achieve good debugging skills, it's essential to code by understanding how things work behind the scene but not by blindly using some third-party libraries, and that's the biggest TAKE away from this course.

The course is designed and explained so that it is generic across any microcontroller. The code we develop can be used as templates to quickly build a peripheral driver for your MCUs on-chip peripherals.


Software/Hardware used:

In this course, the code is developed so that it can be ported to any MCU you have at your hand. If you need any help porting these codes to different MCUs, you can always reach out to me! The course is strictly not bound to any 1 type of MCU. So, if you already have any Development board that runs with an ARM-Cortex M3/M4 processor, I recommend you continue using it. But if you don't have any development boards, then check out the below Development boards.


1. STM32F407xx based Discovery board ( This is the board used in this course)

MCU Vendor: STMicroelectronics


IDE: STM32CUBEIDE (Free)


My promise:

I am confident that this course will save you many hours of studying/experimenting/googling time to learn about MCU programming. I will personally answer your questions about this material, either privately or in a group discussion. If you are not satisfied, for any reason, you can get a full refund from Udemy within 30 days. No questions asked. But I am confident you won't need to. I stand behind this course 100% and am committed to helping you.


Learning order of FastBit Embedded Brain Academy Courses,

If you are a beginner in the field of embedded systems, then you can take our courses in the below-mentioned order.

This is just a recommendation from the instructor for beginners.

1) Microcontroller Embedded C Programming: absolute beginners(Embedded C)

2) Embedded Systems Programming on ARM Cortex-M3/M4 Processor(ARM Cortex M4 Processor specific)

3) Mastering Microcontroller with Embedded Driver Development(MCU1)

4) Mastering Microcontroller: TIMERS, PWM, CAN, RTC,LOW POWER(MCU2)

5) Mastering Microcontroller: STM32-LTDC, LCD-TFT, LVGL(MCU3)

6) Embedded System Design using UML State Machines(State machine)

7) Mastering RTOS: Hands-on FreeRTOS and STM32Fx with Debugging(RTOS)

8) ARM Cortex M Microcontroller DMA Programming Demystified(DMA)

9) STM32Fx Microcontroller Custom Bootloader Development(Bootloader)

10) Embedded Linux Step by Step using Beaglebone Black(Linux)

11) Linux device driver programming using Beaglebone Black(LDD1)

Content

Notes and Information

Important Note
Source Code
Rating and Review

Development board used in our courses

About MCU Development board
STM32F4 Discovery and Nucleo : Board Details

Hardware/Software Requirements

Hardware/Software Requirements

IDE installation

Downloading STM32CUBEIDE
Installation-Windows
Installation-Ubuntu
Embedded Target
Documents required

Creating a project using STM32CUBEIDE

Creating Hello-World project
SWV working principle
Testing Hello-World through SWV
OpenOCD and Semihosting to use printf

Embedded Code Debugging Tips and tricks

Debugging options
Single stepping
Disassembly and Register windows
Breakpoints
Expression and variable windows
Memory browser windows
Call stack and fault analyzers
Data watch-points
SFR windows
Other basic features of IDE

Understanding MCU Memory Map

Understanding Memory Map of the MCU: Part 1
Understanding Memory Map of the MCU: Part 2
Understanding Memory Map of the MCU: Part 3
Test your understanding

MCU Bus Interfaces

MCU Bus Interfaces Explanation Part 1: I-Code/D-Code/S-Bus
MCU Bus Interfaces Explanation Part 2: AHB/APB1/APB2
MCU Bus Interfaces Explanation Part 3: Q/A session
Understanding MCU Bus Matrix
Test your understanding

Understanding MCU Clocks and Details

Understanding MCU Clocking System:Part1

Understanding MCU Clock tree

Understanding MCU clock sources and HSE
HSI and RCC registers
Peripheral clock configuration
Exercise : HSI measurements
About USB logic analyzer
Code implementation
Exercise : HSE measurements

Understanding MCU Vector table

Understanding MCU Vector Table: Part-1
Understanding MCU Vector Table: Part-2

Understanding MCU interrupt Design , NVIC, Interrupt handling

Understanding MCU interrupt Design , NVIC, Interrupt handling: Part 1
Understanding MCU interrupt Design , NVIC, Interrupt handling: Part 2
Understanding MCU interrupt Design , NVIC, Interrupt handling: Part 3
Understanding MCU interrupt Design , NVIC, Interrupt handling: Part 4

Importance of "Volatile" Keyword

Importance of "Volatile" Keyword: Part-1
Importance of "Volatile" Keyword-Part 2

GPIO Must know concepts

GPIO pin and GPIO port
GPIO behind the scene
GPIO input mode with high impedance state
GPIO input mode with pull-up/down state
GPIO output mode with open drain state
GPIO output mode with push pull state
Optimizing I/O power consumption
Test your understanding

GPIO Programming structure and Registers

GPIO programming structure
Exploring GPIO PORT and pins of STM32F4xx Discovery board
GPIO Mode register(used to set mode for a pin)
Input configuration of a Microcontroller's GPIO Pin
Output Configuration of a GPIO Pin in Push pull mode
Output Configuration of a GPIO Pin in open drain mode
Input stage of a GPIO pin during output configuration
Alternate functionality Configuration of a GPIO pin
GPIO out put type register explanation

GPIO Registers : SPEED, PULL UP/DOWN, IDR and ODR

GPIO output speed register and its applicability
GPIO Pull up and Pull down register
GPIO input data register
GPIO output data register and summary of various modes discussed

GPIO Alternate functionality register and example of usage

Alternate functionality settings of a GPIO pin with example : Part 1
Alternate functionality settings of a GPIO pin with example : Part 1
Request for Review
Find Out I/O Alt Functionality
Test your understanding
Test your understanding

GPIO peripheral clock control

Enabling and disabling GPIO peripheral clock

GPIO driver development overview and Project creation

GPIO driver development overview
MCU Specific header file and its contents
New project creation and creating MCU specific headerfile
Include path settings
Important note on IDE usage

Updating MCU specific header file with bus domain and peripheral details

Writing base address C macros for MCU's embedded memories : Part 1
Writing base address C macros for MCU's embedded memories : Part 2
Defining base addresses of different bus domains
Defining base addresses of AHB1 Peripherals
Defining base addresses of APB1 and APB2 Peripherals
Defining base addresses conclusion

Structuring peripheral registers

Address of peripheral registers
Structuring peripheral registers
Peripheral definition macros

Writing Clock enable and disable macros

Writing peripheral clock enable and disable C Macros
Project include settings and build

GPIO driver API requirements and handle structure

Creating GPIO driver header and source file
Defining GPIO handle and configuration structure
Driver API requirements and adding API prototypes
Driver API input parameters and return types
Driver empty API implementation and documentation

GPIO driver API Implementation : Clock control

Implementation of GPIO peripheral clock control API

GPIO driver API Implementation : GPIO init and de-init

Writing user configurable macros
Implementation of GPIO init API
Implementation of GPIO init API contd.
Configuring Alternate function registers
GPIO de-init API implementation

GPIO driver API Implementation : GPIO data read and write

Implementation of GPIO input port read and input pin read APIs
Implementation of GPIO output port write and output pin write APIs
Implementation of GPIO pin toggle API

Exercise

Exercise : LED toggling with PUSH PULL configuration
Exercise : LED toggling with OPEN DRAIN configuration
Exercise : Handling on board LED and Button
Exercise : Connecting external button and circuit explanation
Exercise : Testing button interface
Exercise : Button interrupt introduction

GPIO pin Interrupt configuration

GPIO pin Interrupt configuration coding : Part 1
GPIO pin Interrupt configuration coding : Part 2
GPIO pin Interrupt configuration coding : Part 3
GPIO pin Interrupt configuration coding : Part 4
GPIO pin Interrupt configuration coding : Part 5
GPIO pin Interrupt configuration coding : Part 6
GPIO pin Interrupt configuration coding : Part 7

Exercise : GPIO interrupts

Exercise : External button interrupt implementation
Exercise : Debugging the application : Part 1
Exercise : Debugging the application : Part 2

SPI introduction and bus details

Introduction to SPI Bus
SPI comparison with other protocols
Importance of SPI slave select pin
SPI Minimum bus configuration
SPI behind the scene data communication principle

SPI bus configuration and functional block diagram

SPI bus configuration discussion : full duplex, half duplex and simplex
SPI functional block diagram explanation

STM32 NSS pin settings and management

NSS settings in STM32 master and slave modes
STM32 SPI hardware and software slave managements

SPI CPOL and CPHA discussion

SPI CPOL and CPHA discussion
SPI CPOL and CPHA waveform example

SPI serial clock discussion

SPI peripherals of your Microcontroller
SPI Serial clock frequency

SPI Driver : API requirements and configuration structure

SPI API requirements and configuration items
updating MCU specific header file with SPI related details
SPI adding API prototypes to driver header file

SPI Driver API Implementation : Clock control

Implementation of SPI peripheral clock control API

SPI Driver API Implementation : SPI init

SPI user configuration options writing and register bit definition macros
Implementation of SPI init API : Part 1
Implementation of SPI init API : Part 2

SPI Driver API Implementation : Send Data

Implementation of SPI send data API : Part 1
Implementation of SPI send data API : Part 2
Implementation of SPI send data API : Part 3
Implementation of SPI send data API : Part 4

Exercise : SPI Send Data

Exercise to test SPI Send Data API
Finding out microcontroller pins to communicate over SPI2
Exercise : Code implementation : Part 1
Exercise : Code implementation : Part 2
Exercise : Code implementation : Part 3
Exercise : Testing

Exercise : STM32 master and Arduino Slave communication

Exercise : Communicating with Arduino slave
Exercise : Coding Part 1
Exercise : Coding Part 2
Exercise : Coding Part 3
Exercise : Testing

SPI Driver API : Receive data

Implementation of SPI data receive API : Part 1
Implementation of SPI data receive API : Part 2

Exercise : SPI receive data

Exercise : SPI command and response based communication
Exercise : Coding Part 1
Exercise : Coding Part 2
Exercise : Coding Part 3

SPI interrupts

SPI peripheral interrupting the processor

SPI interrupt mode APIs

SPI interrupt mode API implementation and changes to handle structure
SPI send data with interrupt API implementation
SPI receive data with interrupt implementation

SPI Driver API : IRQ handling

SPI : Handling of interrupts
SPI IRQ handler implementation : Part 1
SPI IRQ handler implementation : Part 2
SPI IRQ handler implementation : Part 3

Common problems in SPI

Common problems in SPI and Debugging Tips

I2C introduction and I2C signals

I2C introduction and differences with SPI
I2C SDA and SCL signals

I2C modes

I2C standard and fast mode

Understanding I2C Protocol

I2C Protocol explanation
I2C START and STOP conditions
I2C ACK and NACK
I2C Data validity
Quiz SPI and I2C

I2C master and slave communication

Example of master writing to slave
Understanding repeated START condition

STM32 I2C functional block diagram

I2C functional block diagram

I2C driver API requirements and config structures

I2C driver API requirements
I2C handle and configuration structure
I2C user configurable macros
I2C API prototypes
Steps for I2C init implementation

I2C serial clock discussion(SCLK)

I2C serial clock settings with explanation
Clock Stretching

I2C Driver API : I2C Init

Implementation of I2C init API : Part 1
Implementation of I2C init API : Part 2
Implementation of I2C init API : Part 3

I2C Driver API : I2C Master send data

I2C transfer sequence diagram for master sending data
Implementation of I2C master sending data API : Part 1
Implementation of I2C master sending data API : Part 2
Implementation of I2C master sending data API : Part 3
Implementation of I2C master sending data API : Part 4
Implementation of I2C master sending data API : Part 5

I2C pull up resistance , rise time and bus capacitance

I2C pull up resistance , rise time and bus capacitance discussion
I2C rise time calculation

Exercise

Exercise : Introduction
Exercise : Coding Part 1
Exercise : Coding Part 2
Exercise : Testing

I2C Driver API : I2C Master receive data

I2C transfer sequence diagram for master receiving data
Assignment : I2C master receive data API implementation
Implementation of I2C master receive data API : Part 1
Implementation of I2C master receive data API : Part 2

Exercise

Exercise : Reading data from the I2C slave
Exercise : Coding Part 1
Exercise : Coding Part 2
Exercise : Coding Part 3
Exercise : Testing repeated start

I2C Interrupts and IRQ numbers

I2C IRQ and interrupt discussion
I2C errors and importance of BUSY flag
I2C handle structure modification
I2C adding interrupt related macros and interrupt APIs

I2C interrupt based APIs

Assignment : I2C interrupt APIs implementation
Implementation of I2C interrupt based APIs

I2C IRQ handler implementation

I2C IRQ handler implementation Part 1
I2C IRQ handler implementation Part 2
I2C IRQ handler implementation Part 3
I2C IRQ handler implementation Part 4
I2C IRQ handler implementation Part 5
I2C IRQ handler implementation Part 6
I2C IRQ handler implementation Part 7
I2C IRQ handler implementation Part 8
I2C error IRQ handler implementation

Exercise

Exercise : Testing I2C interrupt APIs part 1
Exercise : Testing I2C interrupt APIs part 2

I2C slave programming

I2C slave programming discussion
I2C transfer sequence diagram for slave transmitter
I2C slave support in driver

Exercise

Exercise : I2C slave programming
Exercise : Coding Part 1
Exercise : Testing
Exercise : Modifying I2C transactions

Common problems in I2C

Common Problems in I2C and Debugging Tips

UART Essentials

Intro UART vs USART
Understanding UART pins
UART frame formats
Baud Rate
Synchronization bits
UART Parity

UART functional block and Peripheral Clock

Exploring UART functional block
UART peripheral clock

UART Communication

UART Transmitter
Uart Receiver
UART Start bit Detection

USART driver development

USART driver development confiugrable items
USART driver APIs prototypes
Configuration options and USART registers
USART Driver API : USART Init
USART Driver API : Tx and Rx assignment
USART Driver API : Send data

USART oversampling and baudrate

USART oversampling
USART Baud rate calculation Part-2
USART Baud rate calculation Part-2
USART baudrate coding

Exercise

Exercise : USART send data to arduino
communicating with PC over UART

USART interrupts

USART interrupt discussion
Exercise
USART IRQ handler implementation : Assignment

BONUS LECTURE

BONUS LECTURE

Screenshots

Mastering Microcontroller and Embedded Driver Development - Screenshot_01Mastering Microcontroller and Embedded Driver Development - Screenshot_02Mastering Microcontroller and Embedded Driver Development - Screenshot_03Mastering Microcontroller and Embedded Driver Development - Screenshot_04

Our review

--- **Global Course Rating**: 4.57 **Course Overview**: "Embedded Programming with STM32 Microcontrollers" has been highly rated by recent students, with praise for its comprehensive approach to teaching microcontroller usage, particularly with the STM32 series. The course is commended for its detailed explanation of peripheral driver development, its well-organized material, and its thorough coverage of topics from the ground up. It's described as a valuable resource for beginners and an excellent refresher for more experienced engineers. **Pros**: - **In-depth Content**: The course is recognized for its detailed explanations and in-depth coverage of all topics related to microcontrollers, particularly focusing on the STM32 Cortex-M4 based MCUs. - **Practical Approach**: Students appreciate the instructor's step-by-step approach, which includes detailed operations on every tiny meaningful detail, aiding in a better understanding of embedded systems. - **Comprehensive Learning**: The course sets a solid foundation for learning about microcontrollers gradually and increases understanding as students progress. - **Excellent Instruction**: The instructor is highly regarded for their extensive knowledge and thorough teaching style, which makes complex subjects easy to understand. - **Real-world Application**: The course teaches how to use data sheets and reference manuals effectively, preparing students to apply their knowledge in real-world scenarios. - **Use of Detailed Examples**: Students find the examples and live debugging segments excellent, as they demonstrate practical problem-solving and error correction. - **Resource for All Levels**: The course is seen as beneficial for beginners but also offers advanced insights for those with prior knowledge in embedded programming. **Cons**: - **Feedback Response**: Some students wish for more immediate feedback from the lecturer or teaching assistant when they have questions. - **Slide Content Density**: A few reviews suggest that the slides could be less text-heavy and more visual, with explanations available as handouts instead. - **C Course Structure Suggestion**: One student recommended that the instructor reads out the detailed explanations during the lectures, rather than just on the slides. - **Quiz and Answer Video Suggestion**: There is a suggestion for quizzes and question answer video sessions to be included at the end of each section for further clarity and practice. - **Content Specificity**: A couple of reviews mention the need for more detailed explanations on specific topics, such as why certain buses have access to particular address ranges and the differences in performance between S, D/I buses, etc. **Student Experience**: Overall, students report a very positive experience with the course. Many express that they stumbled upon a "gem" and found the course content to be incredibly comprehensive and useful for their learning journey. The course is praised for its ability to cover all the basics required to get started with ARM Cortex M4 processors and for offering a route through the complex subject matter of embedded systems. **Final Thoughts**: "Embedded Programming with STM32 Microcontrollers" stands out as a top-rated course, highly recommended for anyone looking to delve into or deepen their understanding of microcontroller programming, especially with the STM32 series. Its comprehensive nature and practical teaching methods make it an invaluable resource for both beginners and seasoned professionals in the field of embedded systems engineering.

Coupons

DateDiscountStatus
7/26/202046% OFF
expired
3/8/202130% OFF
expired

Charts

Price

Mastering Microcontroller and Embedded Driver Development - Price chart

Rating

Mastering Microcontroller and Embedded Driver Development - Ratings chart

Enrollment distribution

Mastering Microcontroller and Embedded Driver Development - Distribution chart
643206
udemy ID
10/17/2015
course created date
6/16/2019
course indexed date
Bot
course submited by