
Watch all course videos to build a solid foundation, then install STM32CubeIDE and download sample code to practice with the STM32G474 microcontroller for power electronics.
Install STM32 Cube IDE, download STM32 G474 example projects, and learn register-level programming alongside APIs, while setting up kits and safety basics.
Explore the stm32g474 microcontroller and its peripherals for power electronics, including gpio outputs, pwm gating, adc inputs, timers, phase-locked loop grid synchronization, and grid-connected converter control.
Explore the gpio module of the stm32g474, covering ports a to f, pin multiplexing, and how to configure pins as outputs with mode, speed, pull, and output type.
Explore the GPIO configuration registers for STM32G474, including mode, output type, speed, and pull-up/pull-down, and learn to set pin levels with ODR and BSRR using read-modify-write.
Learn to create a new stm32 project in stm32cubeide for the stm32g474 nucleo board, configure gpio pins as digital outputs, and generate demonstration code to blink leds.
Configure gpio pins by setting mode to general purpose output. Adjust output type, speed, and pull resistors for pa10, pb9, and pc10, and set bits to drive leds.
Download and run the code, verify pa10, pb9, and pc10 connections with a common ground, then observe leds glow as gpio outputs high via the bit set reset mechanism.
Conclude this section by summarizing gpio setup with stm32 cube ide, header files, and peripheral registers, and emphasize wiring leds with resistors and correct polarity before timers and interrupts.
Explore the STM32G474 clocking system, comparing internal 16 MHz and external 24 MHz oscillators, PLL outputs P, Q, R, RTC with 32.768kHz, up to 170 MHz, and auto code generation.
Explore Stm32g474 timers, including basic timers 6 and 7 for interrupts and adc triggers, and advanced and general purpose timers for pwm, with a high resolution pwm timer for precision.
Enable clocks for timer six and timer one via APB registers. Configure timer control register one, and set prescaler and auto reload to define timing and update events.
Learn to configure STM32G474 clocks and timers using the device configuration tool, enabling the HTC clock and PLL, and generate code to toggle GPIO pins at set timer intervals.
Enable the timer clocks on apb1e and apb2, configure timer 1 control and interrupt registers (cr1, dier) and set the prescaler and auto reload to achieve a one second interval.
Configure timer six to a two-second period by mirroring the timer one setup, enable its update interrupts, and prepare for the interrupt service routine.
Compile the project after fixing a declaration mistake, use a volatile external variable to share data, and clear interrupt flags to prepare the STM32G474 setup for the microcontroller kit.
Explore pulse width modulation on the STM32G474 using timer modules, including high resolution, advanced control, and general purpose timers, to generate gating pulses with dead time for power electronics.
Explore how the STM32G474 PWM modules—high resolution timer and advanced control timers—configure period, counting mode, and compare and capture functions to drive multiple power converters at different switching frequencies.
Enable the STM32G474 high resolution timer module, configure its master timer and six sub-timers for pwm, manage counting modes, updates, buffering, and synchronization with external signals.
Configure the advanced control timer as a pwm module, insert dead time between complementary signals using dtg, dgf, and asymmetric options, and verify gating signals with an oscilloscope.
Configure the high resolution timer (HRTIM) timer one as a pwm module, enable it on APB2, and enable pre enable and update at reset for a 5 kHz switching frequency.
Configure the high resolution timer (HRTM) in continuous mode for a 5 kHz switching period, then generate gating pulses using set/reset logic and cmp registers.
Learn how to configure TIM1 for advanced control on STM32G474: enable channel 1, set complementary outputs, manage the master output enable and update events, and prepare for pin assignment.
Configure timer 1 as a pwm module on the stm32g474 to generate complementary pwm signals and multi-channel gate pulses. Insert dead time to create practical half-bridge switching for power converters.
Execute your final pwm project on the STM32G474 by downloading code and observing changing pulse widths as the compare register updates every interrupt. Observe how dead time can prevent pulses.
Configure TIM1 in up-down count mode, center-aligned, to generate a triangular waveform for PWM modulation in a DC–AC converter, and set update events and compare interrupts.
Configure sampling time and measurement sequences on the STM32G474 ADC, then start conversion in discontinuous mode via software or external trigger, storing 12-bit results in the data register.
Audit and clean copied stm32g474 code, enable timer six and timer one with interrupts, and prepare the adc sawtooth inputs using a pin map to avoid conflicts in power electronics.
Configure the ADC for discontinuous mode with software trigger, select ADC input 12 and 15 on pins B0 and B1, and implement an end-of-conversion interrupt service routine.
Start ADC conversions from the high resolution timer ISR using a software trigger, then prepare for a hardware trigger while sampling multiple channels per PWM cycle.
Compile the project, fix warnings, and verify sawtooth waveform generation from a rectangular waveform via the rc circuit on pc2 and pc3 using timer six, staying within 0-3.3 v.
Verify sawtooth waveforms from RC circuits connected to GPIO PC2 and PC3 on the STM32G474, using current-limiting 2.2 kΩ resistors with 3.3 µF and 4.7 µF capacitors.
Learn to read 12-bit ADC results from the data register, convert them to a 0–3.3 volt value, and verify accuracy by toggling pins and inspecting oscilloscope waveforms.
Configure GPIO outputs, pa0 and pa1, to verify ADC conversions by comparing the 12-bit result (0–4095 at 3.3 V) with a threshold and toggling pins, overlaying with the sawtooth waveform.
Compile the project to verify ADC accuracy, generate pulses, compare them with capacitor waveforms on an oscilloscope, and fix extern variable declarations for a clean build.
Tailor timing of control algorithms and adc triggers with the control timer and resolution timer, and generate sawtooth and sine-triangle pwm on gpios for power electronics engineers.
The STM32G474 microcontroller, a powerful and highly sought-after chip within the STM32 G series, is widely used in the power electronics industry. This course is designed for power electronics engineers who are beginners in embedded systems, providing them with a solid foundation in the functionality of microcontrollers and their integration into power electronics applications.
Through clear, approachable explanations, the course covers the key features and peripherals of the STM32G474 microcontroller, helping learners understand its role in real-world applications. The course emphasizes commonly used modules in power electronics: GPIOs (General Purpose Input/Output), timers, Pulse Width Modulation (PWM), and Analog-to-Digital Converters (ADC).
The curriculum includes hands-on experiments using the NUCLEO-G474RE development board (priced at just USD 20!), which features the STM32G474RE microcontroller and all its peripherals made accessible through convenient headers for easy experimentation. Learners will gain practical experience through simple, engaging projects, helping them build confidence in applying their knowledge to real-world scenarios.
The course is structured to allow learners to set up an affordable home lab for under USD 150, using cost-effective components. The course also introduces STM32CubeIDE, a free tool from STMicroelectronics that simplifies development with auto code generation and detailed register-level configuration of peripheral modules. Learners will explore how to download example projects, access technical documentation, and leverage powerful development tools for optimal learning.
By the end of this course, you will have a comprehensive understanding of the STM32G474 microcontroller, be able to design and implement basic power electronics systems, and gain hands-on experience with the NUCLEO-G474RE development board.