
Download the stm32 cube ide, a free IDE for Windows, Linux, and macOS from ST Microelectronics; accept the license and log in or register to start the 729 MB download.
Install Cube IDE from a downloaded package by extracting, running the installer, selecting an installation location, including ST-link and SEGGER J-link drivers, then set a workspace and handle firewall prompts.
Download the STM32 reference manual, data sheet, and Nucleo user guide, and set up a dedicated bare-metal project workspace with a proper project tree to access registers and peripherals.
Learn how to set up a bare-metal STM32f4 project in cube ide, download and curate cmsis header files, and use memory-mapped addresses to access peripherals without hal libraries.
Discover how to identify and fix errors using instrumentation like print statements, timers, logic analyzers, and JTAG. Balance intrusiveness with non intrusiveness and explore performance debugging in embedded systems.
Enable GPIOA clock and configure PA2 as UART2 TX with MODER and AFRL AF7. Enable UART clock on APB1 and set 115200 baud with 16 mhz, TE and UE.
Explore how the direct memory access (DMA) transfers data in the background, freeing the cortex-m processor. Learn DMA parameters, streams, channels, transfer modes, sizes, increments, data widths, FIFO, and priority.
Learn to implement a memory-to-memory data transfer using the stm32f4 dma module two, enable its clock via the ahb1 enable bit, and configure parameters, fifo, and nvic interrupt.
Implement the dma2_transfer_start function to perform memory-to-memory transfers. Configure peripheral and memory addresses, NDTR length, and enable the DMA stream; note register details and data width.
Develop a timer-driven adc-dma workflow, using timer 2 to trigger adc conversions at 100 Hz, with multi-sample dma and PA0 channel.
Create uart_dma.c and uart_dma.h to implement uart2_dma_rx_tx_init, configure pa2/pa3, enable clocks and baudrate, use dma and interrupts, and outline dma1_init with rx and tx streams.
Implement interrupt handlers for the uart dma driver, clear transfer flags, and test the firmware using a tx/rx loop with dma stream six and usart interrupts.
Develop an spi1 dma driver by configuring gpio pins pa4–pa7 for spi1, enabling clocks, setting master mode, clock phase/polarity, and enabling dma for spi communication, with separate rx/tx streams.
Enable gpio a clock and configure pa5, pa6, pa7 to alternate function af5 for spi1, set master mode with ssm and ssi, baud, enable dma in cr2, and enable spi.
Implement dma2 tx stream configuration for spi 1 tx, selecting channel 3 stream 3, enable clocks, disable and wait for the stream, set memory-to-peripheral direction, and enable interrupts and fifo.
Implement dma2 stream2 spi rx init function by configuring dma parameters, setting memory increment and transfer direction to peripheral to memory, enabling interrupts, and enabling the nvic stream interrupt.
Explore the I2C protocol, a two-wire interface with SDA and SCL, masters and slaves, start and stop conditions, address and data frames, pull-up resistors, and clock speed options.
Develop an I2C DMA bare-metal driver for I2C1, configure PB8/PB9 as AF4, enable clocks and GPIOB, and assign DMA streams 5 and 6 for RX and TX.
Enable the GPIO port B clock on AHB1, configure PB8 (I2C1 SCL) and PB9 (SDA) as I2C1 alternate function AF4, and set open-drain output to prepare for I2C DMA initialization.
Implement the i2c read function using the dma receive flow, taking slave address, reg_addr, p_read_buff, and number_of_bytes, and orchestrating bus busy, start, repeated start, and data transfer.
Test the pwm dma driver with a logic analyzer on pa0/pa1, verify 10 khz output with varying duty cycles, and adapt the driver to accept two duty-cycle arrays for channels.
Are you tired of Copying and Pasting code you don't understand?
Here’s an overview of what you’re getting in this advanced level course...
Developing bare-metal DMA Drivers:
This course completely demystifies the Direct Memory Access (DMA) peripheral. Over 50% of the course is spent on this topic, so that by the end of this course you would have mastered the DMA peripheral.
We shall thoroughly look at developing the following bare-metal DMA drivers.
- Bare-Metal DMA Memory-to-Memory Transfer Driver
- Bare-Metal ADC DMA Regular Conversion Driver
- Bare-Metal ADC DMA Timer Triggered Conversion Driver
- Bare-Metal UART RX/TX DMA Driver
- Bare-Metal SPI RX/TX DMA Driver
- Bare-Metal I2C RX/TX DMA Driver
- Bare-Metal PWM DMA Driver
Developing bare-metal RTC Drivers:
The Realtime Clock (RTC) peripheral is another advanced peripheral demystified in this course. We shall study the theory of realtime clocks, take a look at the capabilies of the realtime clock on our microcontroller and then develop the following drivers for the realtime clock.
- Bare-Metal RTC Calendar Driver
- Bare-Metal RTC Alarm Driver
- Bare-Metal RTC Timestamp Driver
- Bare-Metal RTC Tamper Detection Driver
Developing bare-metal Watchdog Timer Drivers:
Watchdog Timers are an essential component of any robust embedded device. In my opinion, no embedded device should be released onto the market without the implementation of an Independent Watchdog Timer (IWDG). You will understand why I hold this opinion in the course.
In this course we shall develop the following Watchdog Timer drivers:
- Bare-Metal Independent Watchdog (IWDG) Timer Driver
- Bare-Metal Windowed Watchdog (WWDG) Timer Driver
Working with Standby Mode and Wakeup:
Knowing how to put your embedded devics into Low-power mode and coming out of it will greatly improve your ability to developer power efficient embedded solutions. This course will teach you how to put your device into Standby mode and come out of it using different methods.
Specifically, we shall develop the following drivers:
- Bare-Metal Standby Mode and Wakeup Pin Driver
- Bare-Metal Standby Mode and RTC Wakeup Timer Driver
The Art of Debugging :
Knowing how to properly debug your firmware will save you lots of time and money, and may even prolong your life because of the level of frustration and stress you will avoid.
In this course you shall grasp the theoretical aspects of debugging, understand the various types of debugging such functional debugging and performance debugging, and learn the various tools and methods used in different scenarios.
Some of the techniques we you will master include:
- Methods of identifying the cause of HardFault
- Catching anomalous results
- Measuring execution time of an algorithm using a Timer
- Measuring execution time of an algorithm using a Logic Analyzer
- Working with arrays dumps
- Debugging techniques for Timers
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.
This is the Advanced level course for the world famous Embedded Systems Bare-Metal Programming Ground Up™ (STM32). You have to take the Embedded Systems Bare-Metal Programming Ground Up™ (STM32) before taking this course
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.
It's About MORE Than Just Getting the Code to Work
See, this course will change your professional life forever. Here is what one student had to say about the Embedded Systems Bare-Metal Programming Ground Up™ (STM32) course :
"I would suggest this course for all the beginners. The concepts have been covered in the right sequence.And also the best part of this lecture series is getting to know how to explore the reference manual and datasheets."
Here is what another student had to say :
"Extremly helpful to get to understand the uC programming deeper! For me it is much easier from now to develop code because I undertstand the base behind, so I'm more confident and more experienced to develop and debug the code. Really, this course is very useful to link the hardware knowledge with the coding skills. This fills the gap between them. Thanks for it! :)"
A third student :
"I am a professional semiconductor chipset application engineer with 30 years in global embedded product design in system applications. I can say this teacher is very straight forward by sharing his many years knowledge to the students with his true heart. Yes. I love his teaching pace and style!"
Taken by 8000+ Students with 1000+ Reviews
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 in this advanced level course...
Developing bare-metal DMA Drivers:
This course completely demystifies the Direct Memory Access (DMA) peripheral. Over 50% of the course is spent on this topic, so that by the end of this course you would have mastered the DMA peripheral.
We shall thoroughly look at developing the following bare-metal DMA drivers.
- Bare-Metal DMA Memory-to-Memory Transfer Driver
- Bare-Metal ADC DMA Regular Conversion Driver
- Bare-Metal ADC DMA Timer Triggered Conversion Driver
- Bare-Metal UART RX/TX DMA Driver
- Bare-Metal SPI RX/TX DMA Driver
- Bare-Metal I2C RX/TX DMA Driver
- Bare-Metal PWM DMA Driver
Developing bare-metal RTC Drivers:
The Realtime Clock (RTC) peripheral is another advanced peripheral demystified in this course. We shall study the theory of realtime clocks, take a look at the capabilies of the realtime clock on our microcontroller and then develop the following drivers for the realtime clock.
- Bare-Metal RTC Calendar Driver
- Bare-Metal RTC Alarm Driver
- Bare-Metal RTC Timestamp Driver
- Bare-Metal RTC Tamper Detection Driver
Developing bare-metal Watchdog Timer Drivers:
Watchdog Timers are an essential component of any robust embedded device. In my opinion, no embedded device should be released onto the market without the implementation of an Independent Watchdog Timer (IWDG). You will understand why I hold this opinion in the course.
In this course we shall develop the following Watchdog Timer drivers:
- Bare-Metal Independent Watchdog (IWDG) Timer Driver
- Bare-Metal Windowed Watchdog (WWDG) Timer Driver
Working with Standby Mode and Wakeup:
Knowing how to put your embedded devices into Low-power mode and coming out of it will greatly improve your ability to developer power efficient embedded solutions. This course will teach you how to put your device into Standby mode and come out of it using different methods.
Specifically, we shall develop the following drivers:
- Bare-Metal Standby Mode and Wakeup Pin Driver
- Bare-Metal Standby Mode and RTC Wakeup Timer Driver
But it gets better because you will also master....
The Art of Debugging :
Knowing how to properly debug your firmware will save you lots of time and money, and may even prolong your life because of the level of frustration and stress you will avoid.
In this course you shall grasp the theoretical aspects of debugging, understand the various types of debugging such functional debugging and performance debugging, and learn the various tools and methods used in different scenarios.
Some of the techniques we you will master include:
- Methods of identifying the cause of HardFault
- Catching anomalous results
- Measuring execution time of an algorithm using a Timer
- Measuring execution time of an algorithm using a Logic Analyzer
- Working with arrays dumps
- Debugging techniques for Timers
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.
Also it comes with a money back guarantee so you have nothing to lose.