
Discover the fundamentals of embedded systems, their structure, and how C programming with STM32 cube IDE enables practical development for MCU and MPU architectures.
Explore the fundamentals of embedded systems, including hardware, software, and real-time operating systems, and see how single-function, tightly confined, reactive designs power devices like fire alarms and microcontrollers.
Explore the components and structure of embedded systems, including hardware with power, processors, timers, memory, ports, and real time operating systems, plus software tools and the sensor-adc-processor-memory-dac-actuator flow.
Explore the architecture of an embedded system, from user input through software, hardware, and the OS, highlighting how physical devices produce output.
Compare microcontrollers and microprocessors, highlighting MCU architecture, integrated single-chip design, CPU cores, and memory layouts, with emphasis on memory types and bit-width options in embedded systems.
Explore peripheral devices in embedded systems, including serial interfaces such as Rs232, Rs422, Rs485, i2c, spi, usb, memory cards, ethernet, canbus, limbus, profibus, gpio, adc and dac, and debugging ports.
Master the environment setup for embedded systems by installing stm32 cube ide, downloading across Linux, Mac, and Windows, and configuring J-Link driver and stealing driver with a workspace.
Understand what C programming is, how embedded C differs, and how embedded C programs hardware and firmware for microcontrollers in embedded systems.
Explore the difference between general C and embedded C, highlighting how embedded C extends C for microcontroller projects, including hardware addressing, fixed-point arithmetic, and memory access.
Explore how embedded C uses single-line and multi-line comments, processor directives, and port configurations, then cover variables, main function, and flow control.
Learn the basic embedded C program structure by including reg 51 dot h, defining a main function with parameters, and understanding core operators and variables for embedded development.
This lecture introduces variables in C, covers data types like integers, floats, and characters, and explains declaring, defining, naming, and initializing variables.
Explore how C operators perform operations on operands to enable data manipulation, covering assignment, arithmetic, relational, logical, bitwise, size of operator, conditional, and comma operators.
Explore arithmetic operators for addition, subtraction, multiplication, division, and modulus on two numbers, and demonstrate assignment operators like plus-equal updating the left-hand side.
Demonstrate how arithmetic and assignment operators update n1 and n2 using examples like n1 += n2 and n2 /= n1, emphasizing left-hand side storage (lhs) and right-hand side values.
Explore relational and logical operators in C by comparing two variables using greater than, less than, and equals, and understand true and false representations in binary logic.
Explain relational operators like >, >=, <, <=, ==, !=, and show assignment versus comparison with = vs ==. Demonstrate how logical operators combine conditions, using login scenarios as examples.
Master relational and logical operators, using and, or, and not gates to combine conditions with n1, n2, and n3; understand how true or false outcomes arise and preview bitwise operators.
Explore how bitwise operators perform bit-level manipulation in C, including size of operator, and see six operators with patterns like 5 and 9, contrasting them with logical operators.
Explore how bitwise operators in C manipulate binary values, including and, or, xor, and not, along with left and right shift, through practical examples and output predictions.
Master bitwise operators in C, including and, or, xor, not, left and right shifts, and use the size of operator to identify size for types like float, int, and char.
Explore conditional operators and comma operators in embedded C, using the ternary operator as a simple substitute for if-else to determine pass/fail based on a marks threshold.
Learn how the comma operator in C evaluates expressions left to right, discards the left results, and returns the rightmost value, illustrated with a, a+6 and printf.
Explore C storage classes auto, register, static, and external, their memory locations, lifetimes, and scopes, with examples illustrating local and global access and initial values.
Explore how flow controls in C manage execution order, enabling decisions and loops through constructs like for, while, do while, if else, switch, break, and continue.
Explore how if condition and flow control statements direct execution, covering simple if, if else, nested if, multiple ifs, and switch with a 75 score certificate example.
Explore nested if conditions in C for embedded systems, using score-based branching to assign expert, intermediate, or basic certifications, and distinguish outer and inner if statements.
Learn to categorize exam scores using multiple if-else statements, assigning expert, intermediate, or beginner certified levels based on score ranges, with validation for 0–100 and invalid inputs.
Explore how the switch statement selects among multiple execution branches based on values, contrasted with several if blocks, and see an example using five doors.
The lecture demonstrates a switch statement in C that maps letter grades A through F to corresponding marks ranges, using break and a default for invalid input.
Explore for loop, while loop, and do while loop, and differentiate pre-tested loops (entry point) from post-tested loops (exit point), noting do while runs at least once.
Explore how a for loop initializes a counter, tests a condition, and updates to repeat tasks, using a simple print example and a semicolon pitfall that alters the output.
Master the while loop: initialization outside, condition checks, and optional updation, while avoiding infinite loops. Compare for and while by start and end points, and note do while next.
Explore the do-while loop in C programming, which executes the body first, then updates and checks the condition. See its syntax and a practical counting example from one to ten.
Learn how nested loops work, with an outer for loop driving an inner for loop that runs for each iteration and terminates when the outer condition fails.
Explore control transfer statements in embedded C, focusing on break and continue, their effects on loops and switches, and how goto and return alter program flow.
Explore how the goto statement jumps to labeled code blocks and how return marks function termination, with examples using a for loop, even numbers, and unreachable code.
Explore functions in C programming as reusable blocks of statements that perform a task, enabling reuse and modularity through declaration, definition, and call, with or without parameters and return types.
Explore basic functions in C by declaring, defining, and calling the add numbers function with and without parameters, and pass 10 and 20 to see 30 and 60.
Master void and return-type functions in C, exploring with and without parameters, and when to print results versus returning values.
Explore arrays in C as fixed-size, contiguous memory structures that store similar elements. Learn 1d, 2d, and 3d arrays and how they relate to pointers, structures, and primitive types.
Declare a 1d array by specifying a data type and a fixed size with square brackets, the subset operators that select elements. Initialize memory.
Declare and initialize a five-element array, using the subscript operator to access values and print them, then iterate with a for loop to show memory layout.
Declare and work with a 2D array of size 3x3, store values at row and column indices, and iterate with nested for loops to print all elements using printf.
Explore how a three dimensional array builds on two dimensional matrices by stacking 2D arrays and indexing elements within a 2x2 grid.
Show how to access a three dimensional array with nested for loops over array, row, and column, printing with indices to illustrate its structure.
Learn how to work with arrays and functions, pass an array and its size to a function, and print marks using a for loop and scanf.
In this course, learn how pointers in C store the memory address of another variable and enable access and modification of data, powering low level access and dynamic memory allocation.
Demonstrates how a pointer in C stores the address of a variable and how dereferencing a pointer retrieves the variable’s value, using printf to show address and value.
Explore pointer to a pointer in C, showing how a pointer stores the address of another pointer with two stars. Print addresses and values by dereferencing single and double pointers.
Learn how strings in C are stored as one-dimensional arrays of characters ending with the null character, and that double-quoted values become C strings.
Master string handling in C by declaring strings with and without size and terminating with the null character. Use printf and functions like strlen, strcmp, and strcat, plus case conversion.
Explore how pointers manage strings in C, storing character arrays and addresses, printing with printf and %s, and navigating two-dimensional arrays of strings for embedded system applications.
Master storing and printing multiple strings in a two-dimensional character array, using pointers, indices, and for loops with printf to output each string.
Learn to create an embedded C program covering variables, if else, for loops, and arrays and pointers. Implement an LED demo project in Keil uVision for 8051 device 889651.
Demonstrates creating a simple embedded C program to drive eight LEDs using pointers, loops, and bit manipulation, with build, debugging, and deployment to hardware.
Build the project, generate the hex file, and prepare it for deployment to a ROM chip. Use Proteus Design to configure the 8051 microcontroller and LED outputs.
Connect eight leds to eight ports, create a ground circuit, load the hex file from Kiel C51, set the 11.059 mhz clock, and run the simulator to blink the leds.
Explore memory management and input/output programming for embedded systems using C with STM32 Cube IDE, covering data types and variables, storage classes, functions, typecasting, and debugging fundamentals.
Download the eclipse-based STM32 cube IDE by STMicroelectronics, the integrated development environment for developing, compiling, linking, and debugging embedded projects, with latest Windows, Linux, or macOS options.
Explore the stm32 cube ide's eclipse-based platform, c++ arm toolchain, gdb debugger, multi os support, real time tracing, and advanced debug views for embedded c development.
Install stm32 cube ide by double-clicking the 64-bit exe installer after extracting the downloaded package; installation is quick and depends on your processor and RAM.
Meet the embedded target for this course—the STM32 F4 discovery board. It features i/o pins, LEDs, an eight MB crystal, and on-board ST-Link v2 programmer and debugger.
Install gcc for the host on Windows with MinGW, add the MinGW bin to the path, and verify gcc and make to enable STM32 Cube IDE development.
Import STM32 Cube IDE projects by organizing host and target folders within a dedicated workspace. Import, copy, and build with GCC, and configure the C/C++ build environment paths as needed.
Import and organize stm32 projects in host and target workspaces within the ide. Configure gcc paths, build and clean projects, and reproduce binaries with the cross compiler arm gcc.
Create a host project in the IDE on Windows with the min gw GKE toolchain, then build and run a main.c to verify output before targeting the STM32 discovery board.
Create a target stm32 project in the ide, choose c language, set executable binary, and build for discovery hardware, while consulting datasheets and manuals.
Resolve the FPU warning by disabling the hardware FPU and setting the FPU ABI to software. Apply the changes in the build settings and rebuild to confirm the warning disappears.
Explore the onlinegdb web tool to write and run basic C programs and view outputs. Use the installed IDE for programming the target board, since online tools can't handle it.
Create and run a simple C program that prints messages with printf using stdio.h. Learn about main as the entry point, semicolons, and basic project setup in online editors.
Complete the printf exercise 1 by building a simple assignment.c program that uses printf and escape sequences to print text with newlines and embedded double quotes.
Explore escape sequences in C, including printing quotes and backslashes, null characters, and control codes such as \a, \b, \f, \n, \r, \t, and \v.
Master the printf exercise by printing asterisk patterns, using escape sequences for newlines and spacing, and displaying file paths with backslashes and triple quotes in C.
The lecture walks through printf exercise 3 solution, showing escape sequences, printing backslashes with double backslashes, and using \n for newlines while debugging errors.
Learn how comments document code, explain behavior and logic, and stay ignored by the compiler. Compare single-line and multi-line C comments, including // and /* */ syntax.
Explore how C uses data types and variables to represent real-world data, including integers, floats, characters, strings, and unsigned or signed variants with examples like temperature and gender.
Explore C integer data types, their storage sizes and value ranges, including signed and unsigned variants of char, short, int, long, and long long, and printf usage.
Define and print a range of variables, including char data type, using printf with format specifiers, illustrating signed and unsigned integers, long variants, and floating point types.
Create two variables for A to B and B to C, compute their sum as A to C, and print the result in the given format using printf.
Explains that a char uses one byte, with sign bit and remaining seven bits as magnitude in two's complement, yielding range from 0 to 127 and -128 to -1.
Explain how a char uses one byte, with a sign bit and seven magnitude bits, storing values from -128 to 127 using two's complement.
Understand the difference between definition and declaration, master variable naming rules, and learn to declare and initialize C variables while avoiding C99 reserved keywords.
Explore the difference between declaring and defining a variable in C, including extern usage and how local versus global scope affects storage and undefined references.
Explore variable scope by contrasting local and global variables, and see how a score can be accessed across main and other functions through prototypes and proper declarations.
Learn to print variable addresses in C using & and %p, and observe memory addresses for int, char, and short on a 64-bit system.
Storage classes in C determine the scope, visibility, and lifetime of variables and functions, highlighting static and external specifiers. A static local variable preserves its value across function calls.
Learn how static storage class specifiers control variable visibility across multiple files, and how extern enables sharing a global variable with file one, file two, main, and function prototypes.
Explore how the static keyword makes a function private to a single file, with file1.c and main.c sharing a prototype, and preventing external calls through proper scope.
Use the extern keyword, the external storage class specifier, to extend the visibility of variables and functions across multiple files, enabling access to globals from other files, unlike single-file projects.
Learn how to declare and call functions in C with return types, prototypes, and parameters to create modular, maintainable code and reduce redundancy. See how functions like printf provide abstraction.
Learn to implement and call a three-parameter C function with a prototype and definition, and print the result in embedded systems using a main without parameters.
Explore function prototypes, which declare a function's return type, argument list and their data types and order to inform the compiler how to call the function.
Learn to return a value from a function to the calling program using a float return type and a return statement, store it in main variable, and avoid uninitialized results.
Implement a two-file C project with a math function module and main file, providing add, subtract, multiply, and divide for integers; use a math_function.h header with include guards and prototypes.
Explore implementing C functions for add, subtract, multiply, and divide, using headers and prototypes, and display results with printf in decimal and hex formats for integers and floats.
Explore ascii codes and the ascii table, encode characters using 7-bit values, and print strings by their ascii values with printf using %c and %d, including practical hello example.
Explore typecasting in C by comparing implicit and explicit casting, and explain how data types convert and why truncation occurs when moving to smaller types, with practical examples.
Practice explicit typecasting in C to control conversions between int and unsigned char, understand when the compiler performs implicit conversions, and ensure correct float division results.
Create an STM32 F4 project and write a hello world program in C using printf, exploring the inc, source, and startup structure and handling a compiler warning.
Discover how the STM32F4 discovery board, with an ARM Cortex-M4 and on-board ST-LINK, enables SWD or SWO tracing for printf-style debugging.
Learn how to build and cross-compile for an arm target using the IDE, understand elf versus bin and hex formats, and connect an stm32 board for debugging.
Test printf over arm on STM32 by configuring the GDB server and loading the hello world ELF. Use SWV for tracing, with OpenOCD as a semihosting fallback.
Identify common debugging issues in the STM32 IDE, learn to terminate and relaunch debug sessions, and troubleshoot console termination errors to keep debugging running smoothly.
Learn how to view and adjust stm32 cube ide compiler settings, including toolchain version, mcu settings, runtime library, post-build outputs, debugging options, while keeping defaults.
Explore the embedded project build process from pre-processing through parsing, generating object files, to linking into a final executable and optional post-processing formats like elf, bin, or hex.
Explore how the cross compiler handles pre-processing, parsing, assembling, and linking to produce a dot elf file and generate artifacts like list files, linker maps, and makefiles for post processing.
Explore the size of operator on an embedded STM32 target, using a cross compiler and printf to print storage sizes of standard C data types within the IDE environment.
Learn to use sizeof with printf to print sizes of char, short, int, long, long long, and double on an embedded STM32 project, plus build and debug steps.
Analyze an embedded C program on a microcontroller to understand code and data memory, using the IDE’s disassemble feature and GNU tools to inspect the elf executable.
Explore how a microcontroller combines a cpu, non-volatile program memory, volatile data memory, address and data buses, and clocking to execute instructions and host peripherals.
Explore the code memory options on a microcontroller, including ROM, mask ROM, EEPROM, flash, and ferroelectric random access memory, and compare erase methods, costs, and access speeds for STM32 devices.
Create and debug a simple STM32 project, load an elf into flash, and inspect program memory with a memory browser to see where instructions and data reside.
Learn to access flash and sram memory on stm32 f4 using a memory browser, view program machine codes, and explore base addresses and memory maps.
Analyze the elf file with gnu objdump to see how program data moves from flash to sram, and inspect sections such as text, data, and load addresses.
Analyze how the startup reset handler copies data from flash to sram, reveals code and data sections in the elf file, and uses the IDE's disassemble feature.
Explore the STM32 cube IDE disassembly feature, using the object dump tool on the dot elf file to reveal ARM thumb two instructions for instruction-level debugging and optimization checks.
Use the disassemble feature with objdump -D on the elf to view stm32 assembly, including the main function and code sections. Set breakpoints and step through to inspect instruction-level execution.
Learn instruction level debugging in the STM32 IDE using the disassembly window and instruction stepping mode; enable step into and step over to inspect instructions without breakpoints.
Master embedded systems with C on STM32 by mastering data types, including floating point, and pointers. Explore input with scanf, bitwise operations, and leds control through memory mapped registers.
Explore how decimals and real numbers are stored in memory using the IEEE 754 floating point representation, and compare floating point types float and double for large or fractional values.
Explore the IEEE 754 floating point standard, compare single and double precision storage in 32-bit and 64-bit formats, and learn how C uses float and double with format specifiers.
Explore float and double data types, including their storage sizes and precision, and learn to print values with printf using %f, %lf, and %e for fixed and scientific notation.
Demonstrate storing electron charge with float and double variables, print with printf using precision controls, reveal precision loss for small values, and display 28 decimal places.
Explore scanf, the standard library input reader for embedded C, and learn using format specifiers like %d and the address operator to store integers and characters.
Read four numbers with scanf, compute their average as a float, and print the result with printf, using fflush(stdout) to flush the output buffer.
Explore scanf exercise implementation part 2 for embedded systems with C and ARM Cortex, building area calculations for square, rectangle, triangle, trapezoid, and circle with input validation for negative values.
Create a C++ project named scanf_exercise_two, add main.c, and write a program that reads six characters using getchar or scanf, then prints their ASCII codes in numeric form.
Learn to read six characters with scanf and %c, print each ASCII code with %d or %u, and reuse code blocks while exploring input buffering.
Master pointers in C for embedded systems, learn how pointers address memory locations, read and write data to peripherals, and perform pointer arithmetic across 32 bit and 64 bit architectures.
Explore pointer variables and initialization in C, including the meaning of the asterisk, eight-byte pointers on 64-bit systems, and read, write, and arithmetic operations.
Explore pointer variables in C for embedded systems, including eight-byte pointers on 64-bit machines, asterisk notation, and how pointer type controls read, write, increment, and initialization.
Learn how to read data from a pointer by dereferencing it, understand the address operator, and print pointer addresses and values with printf to illustrate memory access in C.
Create two pointer exercises that print and modify variable addresses and values using ampersand and asterisk operators, with int, float, and char variables.
Explore pointer fundamentals in C by implementing a simple exercise that prints addresses and values, assigns an int's address to a pointer, and updates content via dereferencing.
Practice implementing pointer variables in C by declaring int, float, and char values, assigning their addresses to int*, float*, and char*, and printing values and addresses with printf.
Explore pointers in C by printing addresses and values with ampersand and asterisk operators, and use printf to handle int, float, and char variables on STM32 embedded systems.
Explain how stdint.h provides fixed-width aliases like int8_t and uint16_t to prevent portability bugs when compilers choose different int sizes, ensuring reliable embedded C across ARM Cortex targets.
Explore how stdint.h defines fixed-width alias types like int32_t and uint8_t, their max/min macros, and uintptr_t, while noting compiler-dependent header contents and where to locate them in toolchains.
Learn about operators in C, including unary, binary, and ternary operators, and explore arithmetic, relational, logical, bitwise, and assignment operators, plus operator precedence with practical examples.
Explore unary operators in C, including post and pre increment and decrement, through concrete examples that show how operand order affects assignments and printed results.
Learn how unary operators apply to pointer variables in C, including that a uint32_t pointer increments by four versus the arithmetic increment, and how pointer type governs behavior.
Explore relational operators in C, which compare two operands and yield 1 or 0; learn left-to-right evaluation and the operators ==, !=, >, <, >=, <=.
Explore the three C logical operators—and, or, and not—as binary and unary operators; learn truth tables and how non-zero operands affect condition evaluation.
Explore decision making in C with if statements, illustrated by a water level control example and single versus multiple statements using relational operators.
Write a C program using if statements to read a user’s age and print whether they are eligible to vote, with clear messaging for 18 and older.
Explore the if else statement in C, including single and multiple statements, true and false branches, and practical examples like voting eligibility and finding the greatest of two numbers.
Implement an if-else exercise in C by reading two integers, comparing them for equality or which is bigger, and robustly handling invalid input with scanf return checks and integer conversion.
Demonstrate the if else if ladder in C, using multiple conditions and execution order. Apply a practical income tax calculation exercise using four different conditions to determine tax payable.
Implement a tiered tax calculator using an if-else-if ladder in C. Validate income input and handle negatives while applying 0%, 12%, 22%, and 32% rates with a 1000 adjustment.
learners explore the C conditional operator, a ternary expression using ?: with three operands. The first operand's nonzero value selects the second expression; otherwise the third is used.
Explore switch case statements in C, learn the syntax with switch and case labels, and see how to use break and default to check vowels with multiple cases.
Pilot a switch-case exercise to compute areas of circle, triangle, trapezoid, square, and rectangle in a c plus plus project, with input validation to reject negative base, height, and radius.
Implement a switch-case area calculator in C for embedded systems, using stdio and stdint, to compute circle, triangle, and trapezoid areas from user input.
Implement a switch-case based area calculator in C for square, rectangle, triangle, trapezoid, and circle, with robust input validation and clear error messages for embedded systems.
Explore bitwise operators in C for embedded systems, including and, or, not, xor, and left/right shifts; learn to test, set, clear, and toggle bits in memory and peripheral registers.
Build a C project to compute bitwise and, bitwise or, xor, and not on two input numbers using int32_t with printf and scanf.
Test the least significant bit using bit masking in embedded C to determine if a user-entered number is even or odd, applying and, or, xor, and not.
Learn to determine even or odd numbers by masking with one using bitwise and in C. Explore setting the fourth and seventh bit positions.
Clear the fourth, fifth, and sixth bits with the bitwise and. Compare the masking approach to negating the mask and applying and, shown by 0x8F.
Explore how the xor bitwise operator toggles bits using masks to flip an led state on a microcontroller. Learn the two-operand truth table and apply xor to simplify toggling code.
Set the fourth and seventh bits of a number using a mask, compare and vs or, and demonstrate using xor with 0x90 to print the result in hex.
Explore how to connect and identify LEDs on an stm32 f407g board by reading schematics, locating the leds on pd12 and pd15, and understanding gpio ports for microcontroller pin control.
Control port d pins via software by configuring gpio registers, setting pin modes, transmitting data, and reading values; access registers through memory-mapped i/o.
Explore how the 32-bit address bus and system bus target code memory and peripherals, and how the ARM Cortex memory map allocates four gigabytes of address space.
Explore the stm32 memory map and learn to locate peripheral base addresses using the f407 reference manual, including gpio, adc, uart, and ethernet registers.
Understand how the 32-bit address and 32-bit data system bus, under the AHB spec, map memory and peripherals in ARM Cortex-M microcontrollers, enabling pointer-based access to GPIO and ADC registers.
Identify the gpio port and pin 12 connected to the led. Enable the clock, set the pin to output, and drive it high or low.
Enable the peripheral clock using the RCC registers in the STM32 memory map. Set the bit in the Ahb1 peripheral clock register to enable the Gpio.
Calculate gpio peripheral addresses by base address plus offsets, enable the clock via hb1enr, set pin 12 to output in moder, and drive odr bit 12 to turn on led.
Create an stm32 project for the stm32 f4 07g board named led_on, then declare and initialize three uint32_t pointers to peripheral addresses and configure mode and output registers in main.
Enable the GPIO peripheral clock by reading the register, OR-ing with the 0x08 mask to set the third bit, then writing back to preserve other bits.
Replace lines with a single C shorthand line, enable gpu clock on ahb1, configure gpio as output with two-bit fields, and set pin 12 high.
Compile the STM32 project, step through the code, and inspect real-time registers. Enable the GPIO clock, monitor mode registers, and verify LED behavior using memory-mapped peripheral access.
Demonstrate bitwise operations in C by inputting two numbers and calculating bitwise and, or, xor, and not, with console output and example results.
Master the bitwise left shift operator, its two-operand syntax, and how bits move left with zeros filling vacated positions in embedded C. See a practical int c example and outcome.
Explore how bitwise shift operators enable efficient bit masking in embedded systems. Learn to set or clear bits using left shifts for 8-bit, 32-bit, and 64-bit data, avoiding manual masks.
Modify led control by applying bitwise shift operators to set and clear gpio bits, using (1 << 3), ~(3 << 24), and (1 << 24) on stm32.
Extract bit 9 to 14 from a 16-bit data using a right shift and mask, storing the six-bit result into an 8-bit output variable.
Explore how to implement loops in C using while, for, and do-while to print sequences from 1 to 10 and beyond, with practical examples in embedded C.
master the while loop by building a C program that asks for a number and prints its multiplication table up to 12, using printf and scanf.
Engage in while loop exercise two by writing a C program that prompts for integers until zero. It then prints the sum of all positive numbers entered.
Explore the do while loop in C by prompting users to enter numbers until a negative input. Compute and print sum of all entered numbers using the do while loop.
Implement a C program with nested for loops to print a multiplication table from 1 to 12, with values up to the user-entered number, using scanf and printf.
Demonstrate a for loop that initializes, tests, and updates a counter to print a multiplication table from 1 to 9, extendable to 12, using %d and tabs for aligned rows.
Develop a c++ for loop exercise that reads a row count from the user and uses nested loops to print a right-angled asterisk triangle, with a newline after each row.
Modify the led on program into a led toggle by adding a software delay between led on and off, using a busy-wait loop to create a human observable delay.
Set up an STM32 project led_toggle and implement a software delay using a for loop of 10,000 iterations. Toggle the LED inside an infinite loop with a bitwise operation.
Study part two of led toggle using software delay by increasing the loop count and inspecting the while loop with the disassembler to see how the delay governs led toggling.
Celebrate mastering data types, conditionals, pointers, memory management, and hardware peripheral control through embedded C programming on STM32, and commit to ongoing practice and exploration in embedded programming.
Explore the const type qualifier and volatile, showing how const enforces read-only variables and how volatile supports robust embedded C code for bug-free programs.
The lecture explains the const type qualifier, presents two definitions using const and uint8_t, and shows how a value cannot be modified by name but can be changed via pointer.
Explain memory placement of const variables: local const in RAM, global const in flash on STM32, and that modifying them via pointers is blocked and flagged by the compiler.
Understand how compiler optimization affects code, memory access, and power, and how the volatile type qualifier interacts with O0 to O3 levels.
Learn to configure MCU GCC optimization levels in the STM32 IDE, build the LED project at O0, O1, O2, and O3, and compare binary sizes to see optimization effects.
Discover how the volatile qualifier prevents optimization of variable reads and writes in embedded C, with STM32 examples and disassembler insights.
Discover when to use the volatile qualifier to handle unexpected changes in memory mapped peripheral registers, shared global data, and multi-tasking scenarios, and how it influences compiler optimization.
Explore how structures in C define user defined data types by grouping different types, define a car model with members, and estimate memory for structure variables.
Learners implement a car model structure in C, initialize two variables, and print values with printf, while exploring structure definitions, header placement, and member order.
Demonstrates accessing structure members and initializing with C89 and C99 designated initializers via dot operators, using a car structure with multiple data types printed by printf.
Explore how alignment and padding affect a structure's memory usage by using the size of operator to print the Car model structure sizes in a starter embedded C project.
Master typedef with structs to create alias types like car_model_t, instantiate car_ford and car_honda, and explore nested or self-referencing structures for parameters and linked data.
Explore structures and pointers by creating structure pointers and reading and writing member data via base addresses. Learn memory basics, structure variables vs memory, and pointer type casting with uint8_t.
Modify structure elements using pointers by assigning values through a structure pointer. Access members with the arrow operator, pass the structure address to functions, and print results with printf.
Explore how to pass a structure to a function in C, comparing pass by value and pass by reference, and using dot and arrow operators to access fields.
Understand unions in C, where all members share memory and only one value is stored at a time. Compare with structures and see how unions support mutually exclusive address values.
Explore how unions share memory for multiple members, print short and long addresses, and observe memory overwrite when assigning values, using printf to verify results.
Explore how unions enable bit extraction and memory-efficient storage in embedded code, using a packet structure to illustrate bit fields and union and structure combinations.
Demonstrate mapping a 32-bit packet to fields with a union and a bit-field structure, replacing manual bitwise extraction in embedded C for STM32.
Learn to nest a structure inside a union, access members with dot notation, and save code by combining union and structure to map bit fields into memory efficiently.
Explore how structures and bit fields enable abstraction in embedded systems, refining the led toggle example and mapping peripheral register bits for driver interfaces.
Define typedef bit-field structures to encode peripheral registers, naming RCC_AHB1ER_t and GPIO registers, and build a STM32 led toggle bit-field project with GPIO mode and odr.
Create a bit-field structure for the ahb1enr register, marking multiple reserved fields, and define typedefs for gpio mode and gpio output data registers to enable seamless peripheral setup.
Create typedef structures for gpio x mode and odr registers using uint32_t, covering pins zero to fifteen with reserved bits, yielding a generic gpio x structure for any peripheral.
Modify the LED toggle exercise using typedef structures and bitfields to configure the Gpio mode register via a pointer, type-cast the address to RCC_AB1EN_t, and enable the Gpio clock.
Modify the led toggle exercise on STM32 using volatile constant GPIO pointers. Enable clock, configure the mode and output registers, and toggle pin 12 with a delay.
Learn how arrays in C store 100 values in one variable, enabling you to compute averages without 100 separate variables while highlighting base addresses and contiguous memory.
Initialize an array of ten values, read and write elements, and print results with a for loop and printf. Use zero-based indexing, update index 2 to 0x33, and reprint.
Learn how to pass an array to a function in C, using pointers, a display function, and optional length parameters or size calculations to print array elements.
Understand strings in C as a collection of characters terminated by a null character. Store strings using a character array and note the null terminator in memory.
Strings in C are arrays of characters terminated by a null character, marking the end of the string. Initialize and manipulate these strings using character arrays and functions like strlen.
Introduction: Dive into the powerful world of embedded systems where software meets hardware. This comprehensive course walks you through the fundamentals of embedded systems using the C programming language, and gradually transitions into advanced programming with ARM Cortex-based STM32 microcontrollers. Whether you are a beginner or a budding engineer, this course will bridge the gap between theory and hands-on embedded application development.
Section 1: C Programming for Embedded Systems This section sets the stage by providing a deep introduction to embedded systems, including their architecture, components, and differences between MCUs and MPUs. It then builds a solid foundation in the C programming language — starting from variables and operators to loops, flow control, functions, arrays, pointers, and strings. It wraps up with a complete embedded project cycle from coding to deployment, enabling learners to understand how C works in embedded environments.
Section 2: Embedded C Programming Essentials Learn how to get your hands dirty with real embedded development. This section focuses on installing and using STM32CubeIDE, creating host and target projects, compiler setups, and key debugging practices. You'll also refine your knowledge of C syntax, data types, functions, scope, and memory addressing through embedded-specific demos and tool-based exercises.
Section 3: ARM Cortex (STM32) Fundamentals – Building Embedded Systems Step into the ARM Cortex (STM32) domain where you apply C knowledge to manipulate I/O, control memory-mapped registers, and implement decision-making with real hardware. Learn core embedded programming concepts like bitwise operations, LED control, software delays, peripheral register access, and instruction-level debugging, leading to practical embedded system builds.
Section 4: ARM Cortex (STM32) Deep Dive – Mastering Embedded Systems Take your embedded skills to an expert level. This advanced section introduces compiler optimizations, const and volatile usage, memory placements, and extensive structure and union handling. It culminates in advanced applications like GPIO register manipulation via structures and hands-on system design with bit-fields, arrays, and strings.
Conclusion: By the end of this course, you'll confidently code embedded applications, manipulate hardware registers, and build real-time projects using C and STM32. You'll bridge the gap from basic C concepts to complex embedded projects that prepare you for industry-level challenges.