Spark Logic

STM32F103 PWM audio player with DMA connection guide

STM32F103 PWM audio player with DMA (STM32F103C8T6 Blue Pill) connection guide. Power the board from USB. Check the PB6 PWM waveform.

STM32F103C8T6 Blue Pill

55 contacts Current package

Spark Logic project archive· This map follows the vcc-gnd.com Blue Pill schematic dated 2016-01-26. Check the wiring and fitted parts on other Blue Pill boards.

Power the board from USB

Required

Micro-USB VBUS and H2-3 share the 5 V rail directly, with no isolation between them. The onboard RT9193-33 regulator supplies the 3.3 V rail. Leave external power headers disconnected. Check the 3.3 V rail before attaching the debug probe.

  • USB power input
    • USB host VBUS
  • USB return
    • USB host ground
  • Board logic rail
    • 3.3 V measurement point

Bench checks

  • Identify the USB power input and ground in the documentation for your PCB revision.
  • Measure roughly 3.3 V between the board logic rail and ground. Check for a short or wrong connector if the rail is low.

STM32F103C8T6 Blue Pill connector map

Connection scenarios

Check the PB6 PWM waveform

Run the playback test with a high-impedance probe attached to PB6 and a common ground. Use a buffer and filter designed for the load before connecting an audio transducer.

  • PWM output
    • Oscilloscope probe
  • Return
    • Oscilloscope ground

Bench checks

  • Start with fixed low, mid and high samples to verify duty cycle and timer preload.
  • Use a short ramp to verify that duty cycle changes at the expected sample cadence. Confirm DMA transfer completion and the chosen idle state.

Original PWM audio project and RM0008 Rev 21, DMA request mapping.

STM32F103C8T6 Blue Pill wiring map

External wiring example · Check the PB6 PWM waveform

Highlighted contacts are used in the required step or selected circuit. Select a contact to highlight its wiring nets.

Connector contacts

H1 and H2 correspond to P3 and P4, H3 to SWD P2, and H4 to Micro-USB U3. Boot contacts use the schematic’s P1 numbering.

Selected pin details

H1-20 · G

Return · Ground

Connects to the board’s ground plane.

STM32F103C8T6 Blue Pill connector map

Internally shared terminals

Electrical limits · Pin in the reference

Models and documents

This guide follows the archived Blue Pill example using a short unsigned 8-bit, 16 kHz sample array in Flash. The output is first checked as a logic waveform.

STM32F103C8T6 Blue Pill
This map follows the vcc-gnd.com Blue Pill schematic dated 2016-01-26. Check the wiring and fitted parts on other Blue Pill boards.