Mastering Microcontroller: Timers/ PWM/ CAN/ Low Power(MCU2)
About Course
Update: English closed captions have been added, transcript available
Course code: MCU2
>>Welcome to the course which teaches you advanced Micro-controller programming. In this course you are going to learn and master Timers , PWM, CAN, RTC, Low Power modes of STM32F4x Micro-controller with step by step guidance. Highly recommended if you are seeking a career in the domain of Embedded software. <<
In this course, you will understand behind the scene working of peripherals with supportive code exercises. I have included various real-time exercises which help you to master every peripheral covered in this course and this course thoroughly covers both theory and practical aspects of Timers, PWM, CAN, RTC, Low Power modes of STM32F4x Micro-controller.
In Timer Section the course covers,
1. Simple time-based generation using the basic timer in both polling and interrupt mode
2. Timer interrupts and IRQ numbers, ISR implementation, callbacks, etc
3. General-purpose timer
4. Working with Input Capture channels of General-purpose timer
5. Interrupts, IRQs, ISRs, callbacks related to Input Capture engine of the general purpose timer
6. Working with output capture channels of the General purpose timer
7. Interrupts, IRQs, ISRs, callbacks related to Output Capture engine of the general purpose timer
8. PWM generation using output capture modes
9. PWM Exercises
10. Step by Step code development process will help you to master the TIMER peripheral
In CAN Section the course covers,
1. Introduction to the CAN protocol
2. CAN frame formats
3. Understanding a CAN node
4. CAN signaling (single-ended signals vs differential signals ) \
5. CAN Bus recessive state and dominant state
6. CAN Bit timing Calculation \
7. CAN network with Transceivers
8. Exploring inside view of CAN transceivers
9. CAN Self-test modes such as LOOPBACK, SILENT LOOPBACK, etc with code exercises.
10. Exploring STM32 bXCAN peripheral
11. self-testing of bxCAN peripheral with exercises
12. bXCAN block diagram
13. Tx/Rx path of the bxCAN Peripheral
14. CAN frame filtering and executrices
15. CAN in Normal Mode
16. Communicating between 2 boards over CAN
17. Code exercises
In the Power Controller Section the course covers,
1. ARM Cortex Mx Low Power Modes Normals Vs DeepSleep
2. STM32 SLEEP mode
3. STOP mode
4. STANDBY mode
5. Current measurement with different submode
6. Waking up MCU by using wakeup pins, EXTI, RTC, etc
7. Backup SRAM
8. Step by Step coverage with lots of code exercises.
In RTC Section the course covers,
1. RTC functional block diagram
2. RTC clock management
3. RTC calendar unit
4. RTC Alarm unit
5. RTC wake-up unit
6. RTC Time Stamp Unit
7. waking up MCU using RTC events
8. RTC interrupts
9. and lots of other details with step by step code exercises.
STM32 Device HAL framework
1. STM32 Device Hal framework details
2. APIs details
3. Interrupt handling
4. Callback implementation
5. Peripheral Handling and configurations
6. Step by Step explanation with code exercises.
==> Important note: This course is NOT about auto-generating code using STM32CubeMx software<==
Hardware used :
STM32F446RE-NUCLEO Board
CAN Transceivers for CAN Exercises
IDE used :
Eclipse-based OpenSTM32 SystemWorkbench
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)
What Will You Learn?
- You will learn from scratch about STM32 Timers : Basic and General Purpose Timers
- Understand General purpose timer's Input capture and Output compare unit handling and Exercises
- Handling of Timer interrupts : Time base interrupts, capture interrupts, compare interrupts
- You will learn from scratch CAN Protocol, CAN Signalling, CAN Transceivers , Bus Access procedures
- Understand CAN LOOPBACK mode, SILENT mode and NORMAL mode
- Understand about CAN filtering
- Learn about CAN interrupts
- CAN Peripheral programming using STM32 device HAL drivers
- You will master Low power modes of the MCU : SLEEP,STOP and STANDBY
- You will understand different power domains of the MCU : VDD domain, 1.2V domain, backup domain
- Understand Microcontroller Wakeup Procedures using : RTC, wakeup pins,EXTI,etc.
- You will master RTC Features : CALENDAR, ALARM , TIME STAMP,WAKEUP UNIT
- RTC interrupts and wake up procedures
- Mastering Microcontroller Clocks Handling : HSE,HSI,LSE,LSI,PLL
- Understand phase locked loop (PLL) programming
- Learn PWM mode and Master through step by step code exercises
- You should be able to quickly develop applications which involves STM32 Device HAL layer
Course Content
Introduction
-
A Message from the Professor
-
– what are we going to do in this course
07:15
Development board details
-
– About the development board used in this course
03:06 -
– Board Details and Locating Documents
03:04 -
– STLink Driver Installation
03:26 -
– ST Link Firmware Upgrade
04:06
Installing OpenSTM32 SystemWorkbench
-
– Downloading and Installing OpenSTM32 SystemWorkbench
05:42 -
– Installing OpenSTM32 SystemWorkbench
04:52 -
– STM32 CUBE mx installation
04:11
STM32 HAL and Project Architecture
-
– Introduction to STM32 Cube Project Architecture
02:40 -
– Creating and Importing Project into OpenSTM32 System Workbench Part1
00:41 -
– Understanding Project Hierarchy
06:32 -
– Project Layers Interaction
09:18 -
– STM32 Cube framework program flow1
02:38 -
– STM32 Cube framework program flow2
04:05 -
– HALInit
06:52 -
– Understanding mainc mspc and itc
07:58 -
– Peripheral Handle Structure
11:50 -
– Linking Handle Structure and Peripheral
13:09 -
– STM32 HAL Header File Hierarchy
06:09
Understanding STM32 HAL program flow with UART exercise
-
– Importing Source Codes
07:33 -
– Project Creation
05:37 -
– Low level Processor specific hardware initialization Part 1
02:50 -
– Low level Processor specific hardware initialization Part 2
03:39 -
– Low level Processor specific hardware initialization Part 3
09:42 -
– Peripheral High Level Initialization
14:17 -
– Peripheral Low Level Initialization
06:15 -
– Peripheral Low Level Initialization configuring Pin Packs
05:39 -
– Peripheral Low Level Initialization Alternate function settings
14:18 -
– Peripheral Low Level Initialization IRQ settings
07:00 -
– STM32 HAL Peripheral data handling APIs
03:49 -
– UART Data TXing Part 1
07:36 -
– UART Data TXing Part 2
06:17 -
– UART Data RXing Intro
01:16 -
– Implementing UART DATA RXing in Polling mode
11:31 -
– UART Data RXing in Interrupt Mode Part 1
01:16 -
– UART Data RXing in Interrupt Mode Part 2
12:08 -
– UART Data RXing in Interrupt Mode Part 3
08:35 -
– UART Data RXing in Interrupt Mode Part 4
02:18
Clocks and PLL Programming
-
– Introduction to different clock sources of the microcontroller
14:14 -
– Understanding methods to configure the SYSCLK
03:24 -
– Exploring clock handling APIs in RCC driver files
06:39 -
– Exercise OSC Init and HSE bypass
11:33 -
– Exercise Clock init implementation
16:32 -
– Exercise SYSTICK configuration and summary
09:20 -
– Exercise Testing
01:16 -
– Understanding HSI calibration
09:08 -
– PLL introduction and working principle
08:55 -
– Exercise PLL Configuration via HSI Part 1
16:31 -
– Exercise PLL Configuration via HSI Part 2
10:37 -
– Exercise PLL Configuration via HSE
02:29 -
– Exercise PLL Configuration for 180MHz
00:54 -
– Exercise PLL Configuration for 180MHz implementation
05:55
Timers
-
– Introduction to Timers
07:03 -
– Types of Timers
02:14 -
– Timer Availability in STM32 MCUs
06:26 -
– Timer Availability in STM32 MCUs Summary
03:06 -
– STM32 Basic Timer Assembly
07:34 -
– Timer Exercise Project creation
04:58 -
– Timer Exercise Understanding Timer Clock TIMxCLK
16:20 -
– Timer Exercise Understanding Prescaler and PeriodARR
06:15 -
– Timer Exercise Period Value Calculation
04:19 -
– Timer Exercise MSP Init Implementation
12:10 -
– Timer Exercise Test
15:22 -
– Timer Exercise Interrupt Mode
15:07 -
– Timer Exercise 10 Micro timer base generation
07:18
General Purpose Timer Input Capture Unit
-
– Timer with input capture block
08:03 -
– Input Capture Exercise working principle
04:16 -
– Input Capture Exercise time base init
10:59 -
– Input Capture Exercise Channel Configuration
13:32 -
– Input Capture Exercise Channel Configuration Coding
10:46 -
– LSE Configuration
10:16 -
– Testing of LSE on MCO1 Pin
06:12 -
– Timer Input Capture Callback Implementation
15:28 -
– Input Capture Exercise Testing
03:02 -
– Input Capture Exercise Update on HSE
00:51 -
– Input Capture Exercise with 4Mhz external signal
06:39 -
– Input Capture Exercise with 50KHz external signal
03:35
Timers Output Compare unit
-
– Timer Output compare Introduction
06:56 -
– Output Compare Exercise Project Creation
01:07 -
– Output Compare Exercise Coding Part 1
12:43 -
– Output Compare Exercise Coding Part 2
05:26 -
– Output Compare Exercise Coding Part 3
04:08 -
– Output Compare Exercise Coding Part 4
10:22 -
– Output Compare Assignment
01:09
PWM
-
– PWM Introduction
05:16 -
– PWM Exercise Part 1
01:00 -
– PWM Exercise Part 2
01:07 -
– PWM Exercise Part 3
07:46 -
– PWM Exercise Part 4
07:22 -
– PWM Exercise Part 5
04:14 -
– PWM Exercise Part 6
02:39 -
– PWM Exercise Part 7
05:39 -
– LED brightness control using PWM signal Part 1
03:13 -
– LED brightness control using PWM signal Part 2
11:07
Controller Area Network Fundamentals
-
– CAN section introduction
02:29 -
– Introduction to CAN
03:18 -
– CANs most attractive features
04:28 -
– Summary of CAN features
02:00 -
– Understanding a CAN and its parts
05:59 -
– CAN single ended signals Vs Differential signal
02:59 -
– Understanding CAN differential signals
08:34 -
– CAN Dominant and Recessive Signal states
03:53 -
– CAN signalling summary
01:51
CAN frame formats
-
– CAN Message format explanation Arbitration field
06:26 -
– Standard CAN Vs Extended CAN
06:27 -
– CAN Message format explanation ACK bit
04:00 -
– ACK Summary
01:53 -
– CAN Message format explanation EOF IFS and SOF
02:43 -
– CAN remote frame
01:41
CAN Bus Arbitration
-
– Understanding CAN bit wise arbitration
08:04
STM32 bxCAN
-
– STM32 bxCAN introdcution
04:48 -
– STM32 bxCAN block diagram
06:00 -
– STM32 bxCAN self test modes
03:21 -
– Exercise CAN loop back mode Project Creation
03:07 -
– CAN bit timing calculation
14:05 -
– Exercise CAN loop back mode Coding init function
06:22 -
– Exploring bxCAN TX path
08:42 -
– Exercise CAN loop back mode Coding Tx function
09:08 -
– understanding bxCAN operating modes
03:02 -
– Exercise CAN loop back mode MSP code implementation
01:08 -
– CAN loopback connection details
04:06 -
– Exercise CAN loop back mode Testing and Protocol decoding
07:11 -
– STM32 bxCAN RX block diagram and acceptance filters
07:01
bxCAN Frame filtering
-
– Understanding bxCAN acceptance filtering with examples
12:01 -
– Exploring filtering data structures
04:53 -
– Exercise CAN loop back mode Coding RX function
05:42 -
– Exercise CAN filter config implementation and testing TXRX
08:54
CAN interrupts
-
– Understanding STM32 bxCAN Interrupt requests IRQs
15:16 -
– CAN LOOPBACK interrupt mode implementation Part 1
10:20 -
– CAN LOOPBACK interrupt mode implementation Part 2
04:40
CAN normal mode and exercise
-
– Exercise CAN Normal Node Introduction Part1
02:41 -
– Exercise CAN Normal Node Project Creation Part2
01:33 -
– Exercise CAN Normal Node Code Implementation Part3
05:19 -
– Exercise CAN Normal Node Code Implementation Part4
01:46 -
– Exercise CAN Normal Node Code Implementation Part5
01:38 -
– Exercise CAN Normal Node Testing TX Part6
05:52 -
– Exercise CAN Normal Node Testing TX Part7
01:42 -
– Exercise CAN Normal Node RX Code implementation Part8
06:14 -
– Exercise CAN Normal Node RX Code implementation Part9
04:22 -
– Exercise CAN Normal Node Sending Remote Frame Part10
01:27 -
– Exercise CAN Normal Node Testing Part11
02:52 -
– Exercise CAN Normal Node Testing TX at 1Mbitsec Part12
05:04 -
– Exercise CAN Normal Configuring acceptance filtering Part13
05:06 -
– Exercise CAN Normal Configuring acceptance filtering Part14
02:35
Low Power Modes
-
– Section Introduction
01:53 -
– MCU low power modes introduction
03:55 -
– Processor specific low power modes
06:53 -
– Entering normal and deep sleep modes
02:11 -
– Entering sleep mode using SLEEPONEXIT feature
04:04 -
– Exercise Usage of SLEEPONEXIT feature
02:41 -
– waking up from SLEEPONEXIT feature
02:50 -
– Exercise test SLEEPONEXIT feature creating a project
00:40 -
– Exercise Implementation and current measurement without SLEEPONEXIT feature
05:16 -
– Current measurement with SLEEPONEXIT feature
05:23 -
– SLEEPONEXIT Exercise summary
02:03
Current reduction tips and tricks
-
– Tips to reduce current consumption
03:38 -
– Current measurement with increased HCLK frequency
03:43 -
– Current measurement with increased UART baudrate
05:35 -
– Clock gating and RCC Low power register settings
08:21 -
– IO analog mode and effect on current consumption
02:38 -
– Current measurement in IO analog mode
05:06
WFI and WFE
-
– Understanding WFI instruction
04:43 -
– WFI Exercise Introduction
00:46 -
– WFI Exercise Implementation
06:45 -
– Understanding WFE and event register of ARM Cortex Mx processor
10:02 -
– WFE wakeup behavior and Comparison with WFI
10:40 -
– WFE exercise introduction
01:11 -
– WFE project explanation
00:49 -
– Generating Peripheral events in STM32 MCU
06:15 -
– WFE project implementationPart1
01:51 -
– WFE project implementationPart2
03:01 -
– Difference and similarity between WFI and WFE
01:44 -
– When to use WFE and WFI
03:57
STM32 Low Power modes and Voltage domains
-
– MCU specific low power modes
08:55 -
– STM32 MCU voltage domains
07:01
STM32 Voltage Regulator
-
– STM32 voltage regulator and its modes
12:39 -
– Voltage regulator Over Drive and Power Down mode
05:02
Current Measurement and datasheet comparison RUN Mode
-
– Current measurement with coremark in Run modePart1
17:06 -
– Current measurement with coremark in Run modePart2
02:55 -
– Run mode current measurement HCLK180MHz all peripherals enabled
02:09 -
– Run mode current measurement HCLK180MHz all peripherals enabled ART
02:02
Current Measurement and datasheet comparison SLEEP Mode
-
– SLEEP mode current measurement
04:20 -
– SLEEP mode and Voltage regulator settings to save current
10:22
Current Measurement and datasheet comparison STOP Mode
-
– STOP mode and wakeup latency
04:45 -
– STOP mode current measurement
14:23 -
– Microcontroller wakeup Pins discussion
05:59
STM32 BACKUP SRAM and STANDBY MODE effect
-
– Understanding STM32 BACKUP SRAM
03:43 -
– Different types of MCU resets
06:08 -
– BACKUP SRAM exercise Intro
01:11 -
– Backup SRAM Exercise implementation part 1
15:26 -
– Backup SRAM Exercise implementation part 2
10:54
RTC and RTC Calendar Block
-
– RTC Introduction
05:05 -
– RTC BCD programming example
09:02 -
– RTC block diagram and RTC Clock selection
07:45 -
– RTC and STM32 device HAL APIs explanation
04:55 -
– Exercise RTC Calendar Part1
09:46 -
– Exercise RTC Calendar Part2
05:46 -
– Exercise RTC Calendar Part3
06:19 -
– Exercise RTC Calendar Part4
11:24 -
– Exercise RTC Calendar Testing
02:38 -
– Exercise RTC Calendar Testing with system reset and STANDBY exit
05:55
RTC Alarm
-
– RTC Alarm Introduction
07:38 -
– STM32 CUBE APIs for RTC Alarm Handling
04:53
RTC Interrupts
-
– RTC Interrupts and IRQ numbers
05:54 -
– RTC Interrupts Summary
01:46
RTC Alarm Exercises
-
– RTC Alarm Exercise1
10:20 -
– RTC Alarm Exercise1 Testing
03:45 -
– RTC Alarm Exercise2
01:07 -
– RTC Alarm Exercise2 Testing
03:12 -
– RTC Alarm Exercise3
07:01 -
– RTC Alarm Exercise4
03:56
Earn a certificate
Add this certificate to your resume to demonstrate your skills & increase your chances of getting noticed.