Firmware tutorial on how to combine the USB mass storage device (MSD) class with an SD card (attached via SDMMC) on a custom STM32-based hardware platform.
STM32 USB SD Card Mass Storage Device Tutorial - Phils Lab #148Phil’s Lab2024-11-18 | JLCPCB PCB Fab & Assembly from $2! Register to get $80 Coupons: jlcpcb.com/?from=PhilsLab
Firmware tutorial on how to combine the USB mass storage device (MSD) class with an SD card (attached via SDMMC) on a custom STM32-based hardware platform.
05:51 Pinout & Peripheral Set-Up 08:31 SDMMC Set-Up 11:47 Clock Configuration 13:22 USB MSD Class Middleware
14:37 Driver Implementation 16:30 GetCapacity Function 18:02 Read/Write Functions
19:59 SD Card Formatting 21:01 Capacity Test 22:09 Write Test 23:22 Improving Read/Write Speed 24:25 Improved Write Test 25:25 Read Test
26:47 OutroPower Supply Rejection Ratio (PSRR) Basics & Measurement - Phils Lab #163Phil’s Lab2025-09-23 | Basics of power supply rejection ratio (PSRR) as it applies to regulators and how to measure it using various techniques (Bode 100, oscilloscope + function generator).
Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
21:25 OutroAll-Pass Filter Software Implementation (STM32 DSP) - Phils Lab #162Phil’s Lab2025-08-29 | All-pass filter basics and theory, software implementation in C on an STM32 MCU, and real-world frequency- and time-domain measurements.
Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
02:38 Basics 05:35 First Order Theory 08:47 Second Order Theory
11:08 Hardware 11:45 Software Implementation
17:15 Frequency Domain Test Set-Up 18:34 Calibration & De-Embedding 21:41 First Order (Frequency Domain) 24:29 Second Order (Frequency Domain) 27:44 Time Domain
30:03 OutroPCB Power Distribution Networks (PDN) Basics & Measurements - Phils Lab #161Phil’s Lab2025-08-08 | Basics of PCB power distribution networks, real-world impedance measurement (Bode 100), voltage noise measurements, as well as modelling and simulation using LTSpice.
Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
25:00 Voltage Noise Test Set-Up 29:43 Voltage Noise Measurements 35:50 PDN Plot using Oscilloscope & Signal Generator
38:24 LTSpice Simulation
43:08 OutroInductor Hardware Design Basics (+Measurement & Modelling) - Phils Lab #160Phil’s Lab2025-07-21 | Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
Basics of SMD inductors (MLCC class II). Parameters and characteristics, component selection, derating, impedance vs frequency, modelling and measurements, manufacturer tools, simulation, and examples.
02:35 Inductor Basics 07:07 Derating 09:56 Issues with Derating (Examples) 11:14 Inductor Modelling (Non-Ideal) 13:38 Non-Ideal Frequency Response 15:17 Finding Model Parameters 16:54 Measurement Set-Up 17:43 Impedance vs Frequency Measurement 19:14 Acquiring Model Parameters from Measurement 21:46 SPICE Simulation 24:51 SPICE Inductor Tips 25:45 Inductor Selection Considerations
28:32 OutroBilinear Transform IIR Filter Design (STM32 DSP) - Phils Lab #159Phil’s Lab2025-06-30 | Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
Basics of discretisation of analog filter prototypes using the Bilinear (Tustin) transform for an STM32-based custom DSP hardware effects platform. Demonstration of derivation, frequency-warping, and software implementation in C.
02:38 Discretisation Basics 04:36 Discretisation Methods 06:19 Bilinear Transform Derivation 07:52 Stability 08:19 Frequency Warping 09:41 RC Low-Pass Filter Example 13:20 Bilinear vs Backward Euler vs Analog Prototype
15:38 Software Implementation (STM32) 21:17 Frequency Response Demo
22:51 OutroPCB Design for Manufacturing (DFM) Q&A with Sierra Circuits - Phils Lab #158Phil’s Lab2025-06-17 | A huge thank you to Amit & Lucy from Sierra Circuits for having a chat with me about design for manufacturing from a PCB manufacturer and assembler's perspective!
[TIMESTAMPS] 00:00 Intro 02:22 Rounded Corners 03:27 Solder Mask Expansion 05:47 Acid Traps 08:07 Teardrops 08:38 Copper Fills, Board Warp, and Copper Balance 12:13 Via Finished Drill Size and Annular Ring 15:30 Pick and Place Orientation Standard 17:12 Reducing Number of Different Drill Sizes 19:06 Fiducial Marker Shape 20:18 Rounding Drill Hole Sizes 21:19 Polarity Markers 22:13 Designators 25:02 Panelisation 27:48 Layer Index, Fab Drawings, and Callouts 30:44 Etch Comp 31:33 Output File Format 33:37 Removing Non-Functional Pads 34:54 OutroAudio Compressor Software Implementation (STM32 DSP) - Phils lab #157Phil’s Lab2025-06-08 | Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
Basics of audio dynamic range compressors, covering their individual functional blocks (envelope detector, gain computer, attack and release) and DSP theory, and implementation in software on an STM32H7 microcontroller. Audio examples using an electric guitar.
32:11 OutroPCB Crosstalk Basics (Tips & Tricks) - Phils Lab #156Phil’s Lab2025-05-12 | Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
Basics of crosstalk as it relates to PCB and hardware design. Discussions on crosstalk basics, far-end and near-end crosstalk, real-world measurements, as well as tips and tricks on how to reduce crosstalk in hardware designs.
03:22 Basics 08:07 Far-End & Near-End 11:17 Calculator 14:00 How Much Can We Tolerate? 16:30 Measurement Demo 22:56 Rise/Fall Time Crosstalk Demo 26:26 Reducing Crosstalk Tips & Tricks
32:16 OutroSeries Termination Resistor Selection (Practical Demo) - Phils Lab #155Phil’s Lab2025-04-21 | Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
How to select an appropriate series termination resistor based on oscilloscope measurements for digital systems. Including discussion on drive strength setting and practical tips.
18:41 OutroSTM32 USB Virtual COM Port - Phils Lab #154Phil’s Lab2025-03-24 | Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $70 New customer coupons: jlcpcb.com/?from=PhilsLab
Firmware tutorial on how to implement transmission and reception using the STM32 Virtual COM Port device class (CDC) and driver on a USB 2.0 FS link.
[TIMESTAMPS] 00:00 Solo 00:18 Intro 01:55 Previous Video 02:23 JLCPCB
03:32 Analogue Overdrive 04:53 Asymmetrical Clipping 06:43 Static Non-Linearity Parameters 08:32 Time & Frequency Domain 10:15 Block Diagram
12:14 Code (STM32)
17:08 Test - Time & Frequency Domain 20:50 Test - Guitar Playthrough
23:39 OutroCeramic Capacitor DC Bias Effects & Measurement - Phils Lab #152Phil’s Lab2025-02-04 | JLCPCB PCB Fab & Assembly from $2! Register to get $70 Coupons: jlcpcb.com/?from=PhilsLab
Basics of DC bias effects and derating of multi-layer ceramic capacitors (MLCC). Acquiring impedance vs frequency curves for DC-biased ceramic capacitors via the two-port shunt-through measurement technique.
18:36 Test Capacitor 19:27 0V DC Bias 20:52 4V DC Bias 23:12 12V DC Bias
25:06 Outro2-Port Shunt-Through Impedance Measurement Basics - Phils Lab #151Phil’s Lab2025-01-13 | JLCPCB PCB Fab & Assembly from $2! Register to get $70 Coupons: jlcpcb.com/?from=PhilsLab
Basics of two-port shunt-through impedance measurements using a Bode 100 with a custom test PCB. Discussion on measurement technique, pitfalls, and calibration. Acquiring impedance vs frequency curves for a SMD inductors and capacitors.
02:30 2-Port Shunt-Thru Basics 04:02 Why is This Useful? 05:12 Bode 100 05:59 Measurement Limitations 06:30 What to Watch Out For 08:04 Ground Loop Errors
19:54 Inductor Measurement 22:01 Comparison With Manufacturer Data 22:46 Capacitor Measurement 24:13 Comparison With Manufacturer Data
25:36 OutroCapacitor Measurement and Modelling Basics (Bode 100) - Phils Lab #150Phil’s Lab2024-12-23 | JLCPCB PCB Fab & Assembly from $2! Register to get $80 Coupons: jlcpcb.com/?from=PhilsLab
Measurement of SMD capacitor characteristics (ceramic, tantalum, electrolytic) using a Bode 100 with an impedance adapter. Discussion on capacitor modelling basics, measurement technique, pitfalls, calibration, and simulation. Acquiring impedance vs frequency curves, extracting capacitance, ESR, and ESL, and using that information in a SPICE model.
02:41 Importance of Measurement & Modelling 05:32 Future Videos 06:07 MLCC Basics Video
06:22 Capacitor Equivalent Model 09:02 Capacitor Impedance vs Frequency 10:37 Next Steps 11:56 Bode 100 13:11 Measurement Types 14:49 Measurement Limitations 15:31 B-SMC Impedance Adapter 16:52 What to Watch Out For
41:20 Parameter Extraction for SPICE Simulation 43:35 SPICE Model and AC Impedance Analysis 44:40 Simulation vs Measurement 45:36 Bode Analyzer Suite Circuit Fit Tool
46:48 OutroSTM32 USB HID Custom Joystick/Gamepad - Phils Lab #149Phil’s Lab2024-12-02 | ⚡️JLCPCB Black Friday Mega Sale!⚡️ Save up to $252 on your JLC orders and enter to win amazing prizes: jlcpcb.com/black-friday-2024/?from=PhilsLab
Firmware tutorial on how to combine custom STM32-based hardware with the USB HID (human interface device) class to emulate a USB joystick or gamepad.
20:09 usbd_hid.h/.c 24:04 Report Descriptor 30:08 Fill & Send Report
33:30 Test
35:24 OutroSTM32 + LVGL Firmware Tutorial - Phils Lab #147Phil’s Lab2024-10-28 | Get your JLCPCB invitation for Electronica 2024 and enter a draw to win a free flight ticket and exciting gifts: jlcpcb.com/Electronica/?from=PhilsLab
How to integrate LVGL graphics libraries on a custom, STM32-based hardware platform. Including installation, configuration, driver linking, and UI creation basics.
20:42 UI Generation 23:46 Adding UI to Project 25:46 UI Demo #1 26:01 Modifying UI Elements in Firmware 28:13 UI Demo #2
28:34 OutroSTM32 + LCD Display (FMC) Firmware Tutorial - Phils Lab #146Phil’s Lab2024-10-14 | JLCPCB PCB Fab & Assembly from $2! Register to get $80 Coupons: jlcpcb.com/?from=PhilsLab
How to use the flexible memory controller (FMC) on STM32 microcontrollers to interface with LCD displays (ILI9341) and parallel, 8080-type interfaces. Including hardware, firmware, and demos.
35:33 OutroRise & Fall Times (Basics & Measurement) - Phils Lab #145Phil’s Lab2024-09-28 | Basics of rise/fall times, and how to measure them using an oscilloscope. Including tests varying drive strength. PCBs by PCBWay pcbway.com
45:34 OutroHow To Write A Driver (Audio CODEC & I2C) - Phils Lab #142Phil’s Lab2024-08-05 | Audio CODEC basics and configuration via I2C in C using an STM32 microcontroller. PCBs by PCBWay pcbway.com
29:21 OutroSTM32 Real-Time FIR Filter Implementation (CMSIS DSP) - Phils Lab #141Phil’s Lab2024-07-22 | How to implement a Finite Impulse Response (FIR) filter on an embedded system (STM32 microcontroller + CODEC) using ARM's CMSIS DSP library. PCBs by PCBWay pcbway.com
09:13 Software Implementation 16:17 Filter Design 21:41 Real-Time Test
25:23 OutroDelay-Based Audio FX Software Implementation (DSP with STM32) - Phils Lab #140Phil’s Lab2024-07-07 | Software implementation of a digital delay effect in C on a real-time STM32-based embedded DSP system. Theory of IIR comb filters, delay parameters, and modelling. PCBs by PCBWay pcbway.com
[TIMESTAMPS] 00:00 Introduction 01:07 PCBWay 01:44 Hardware 04:52 Delay Line 06:58 Delay Block Diagram and Parameters 09:34 Advanced Delay Structures 11:14 Practical Considerations 14:30 C Implementation 22:30 Test Set-Up 22:52 Frequency Response Measurement 24:54 Demo with Guitar 27:35 OutroPCB Chip Antenna Hardware Design - Phils Lab #139Phil’s Lab2024-06-17 | Basics of integrating a PCB chip antenna into hardware designs. Tips on what to watch out for, antenna selection, matching, and PCB design. PCBs by PCBWay pcbway.com
34:53 Outro2-Layer PCB Design Tips - Phils Lab #137Phil’s Lab2024-05-13 | Tips for designing with only two copper layers on a PCB (layer assignment, component placement, routing, GND jumps, RF considerations). PCBs by PCBWay pcbway.com
31:23 OutroSTM32 + RGB LEDs Firmware Tutorial (TIM + DMA) - Phils Lab #136Phil’s Lab2024-04-29 | How to control addressable RGB LEDs (SK6805, WS2812) using PWM timers with DMA in C using STM32 MCUs. PCBs by PCBWay pcbway.com
33:01 OutroPCB Silkscreen & Solder Mask 101 - Phils Lab #133Phil’s Lab2024-03-17 | Basics, tips and tricks for working with silkscreen and solder mask in PCB designs. PCBs by PCBWay pcbway.com
37:45 OutroQA403 Audio Analyzer Tutorial (Noise, SNR, THD+N, ...) - Phils Lab #130Phil’s Lab2024-01-31 | How to measure noise floor, signal-to-noise ratio, total harmonic distortion, frequency response, and more of an audio electronic system using the QA403 audio analyzer. PCBs by PCBWay pcbway.com
29:48 OutroSTM32 Bluetooth Firmware Tutorial (Bring-Up) - Phils Lab #129Phil’s Lab2024-01-13 | Firmware and bring-up tutorial for custom hardware based on STM32WB BLE microcontrollers. PCBs by PCBWay pcbway.com
02:11 Schematic Walkthrough 04:03 Software Tools and Debugger 06:20 STM32CubeProgrammer & USB DFU 09:27 FUS & BLE Stack 14:01 CubeIDE Project, SWD & HSE/LSE Set-Up 17:02 USB Set-Up 18:10 RF/BLE Set-Up 25:00 Clocking 25:45 Flashing Firmware & USB Fix 27:59 Bluetooth Test 29:44 Bluetooth & USB Test
33:02 OutroKiCad 7 STM32 Bluetooth Hardware Design (2/2 PCB) - Phils Lab #128Phil’s Lab2023-12-22 | Step-by-step schematic and PCB design tutorial for STM32WB-based hardware (USB, RF, power) in KiCad 7. (Part 2 of 2) (Part 1: youtu.be/nkHFoxe0mrU) PCBs by PCBWay pcbway.com
01:34 Impulse Response (IR) Basics 04:17 Getting an IR 06:03 IR Audio Sample
06:15 Time Domain 07:51 Frequency Domain 09:31 FIR Filter 11:04 Truncation
14:18 Firmware Implementation 17:18 Test Set-Up 17:43 Measurements (Frequency Domain, IR Length)
21:03 Guitar Demo (Varying IR Length) 21:46 Guitar Demo (Guitar Rig vs Custom DSP)
22:20 OutroClass D Audio Amplifier Hardware Design - Phils Lab #125Phil’s Lab2023-11-09 | Class D audio amplifier basics, part selection, schematic and PCB design, and test. PCBs by PCBWay pcbway.com
26:57 OutroComb Filters & Delay Lines in Software (STM32) - Phils Lab #124Phil’s Lab2023-10-24 | Design your own delay-based audio algorithms with FIR comb filters and delay lines! Theory, measurements, and real-world implementation with STM32 MCUs in C. PCBs by PCBWay pcbway.com
28:42 OutroHow To Read A Datasheet - Phils Lab #123Phil’s Lab2023-10-13 | Basics of navigating datasheets for hardware and firmware design, exploring their structure, which sections are important, and what to pay attention to!
20:41 OutroRC High-Pass Filters Explained - Phils Lab #122Phil’s Lab2023-10-06 | Passive RC high-pass filter basics, theory, real-world tests and demos, practical considerations, and examples both in the time- and frequency-domain. PCBs by PCBWay pcbway.com
31:47 OutroSeries Termination Basics - Phils Lab #121Phil’s Lab2023-09-24 | Basics of termination, reflections, and series termination for hardware and PCB design. Including practical considerations, simulations, and demos. PCBs by PCBWay pcbway.com
22:07 OutroHow PCBs are Manufactured & Assembled (PCBWay Factory Tour) - Phils Lab #120Phil’s Lab2023-09-18 | See how PCBs are made and assembled in the huge PCBWay factory in Shenzhen, China! pcbway.com
23:33 Assembly Process & Incoming Quality Control 25:30 Stencil, Solder Paste, Pick 'n' Place 28:01 Reflow & Inspection 29:28 Through-Hole Assembly & Packaging
31:06 OutroParallel Termination Basics - Phils Lab #119Phil’s Lab2023-09-11 | Basics of termination, reflections, and parallel termination for hardware and PCB design. Including practical considerations, simulations, and demos. PCBs by PCBWay pcbway.com
21:51 OutroRC Low-Pass Filter Deep-Dive - Phils Lab #118Phil’s Lab2023-08-23 | Passive RC low-pass filter basics, theory, real-world tests and demos, practical considerations, and examples both in the time- and frequency-domain. PCBs by PCBWay pcbway.com
34:21 Further Practical Considerations 39:53 Practical Examples
45:29 OutroDSP Overdrive Algorithm in Software (STM32) - Phils Lab #117Phil’s Lab2023-08-08 | How to design and implement an audio soft-clipping overdrive/distortion algorithm on a custom STM32-based digital signal processing system. PCBs by PCBWay pcbway.com
32:40 OutroInterfacing FPGAs with DDR Memory - Phils Lab #115Phil’s Lab2023-07-16 | How to determine FPGA pin-out of DDR interface, connect FPGA to DDR memory module, using Vivado and Memory Interface Generator (MIG) tools (Spartan-7). Including schematic and PCB design tips. PCBWay pcbway.com