TIM4_CH1 PWM on PB6
The timer’s update event requests the DMA transfer. PB6 carries the resulting compare output in the default mapping.
TIM4 drives PWM on PB6. The timer update request triggers DMA1 channel 7 to write each sample into the channel compare register.
Routes to MCU PB13. Choose the applicable GPIO or peripheral function in the MCU documentation.
| Pin | Signal | Direction | Function |
|---|---|---|---|
| H1-1 | VB Power | Power | Connects to VBAT. Use the specified board power connection. |
| H1-2 | C13 Configurable I/O | Configurable I/O | Routes to MCU PC13. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-3 | C14 Configurable I/O | Configurable I/O | Routes to MCU PC14. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-4 | C15 Configurable I/O | Configurable I/O | Routes to MCU PC15. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-5 | A0 Configurable I/O | Configurable I/O | Routes to MCU PA0. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-6 | A1 Configurable I/O | Configurable I/O | Routes to MCU PA1. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-7 | A2 Configurable I/O | Configurable I/O | Routes to MCU PA2. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-8 | A3 Configurable I/O | Configurable I/O | Routes to MCU PA3. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-9 | A4 Configurable I/O | Configurable I/O | Routes to MCU PA4. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-10 | A5 Configurable I/O | Configurable I/O | Routes to MCU PA5. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-11 | A6 Configurable I/O | Configurable I/O | Routes to MCU PA6. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-12 | A7 Configurable I/O | Configurable I/O | Routes to MCU PA7. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-13 | B0 Configurable I/O | Configurable I/O | Routes to MCU PB0. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-14 | B1 Configurable I/O | Configurable I/O | Routes to MCU PB1. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-15 | B10 Configurable I/O | Configurable I/O | Routes to MCU PB10. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-16 | B11 Configurable I/O | Configurable I/O | Routes to MCU PB11. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H1-17 | R Active-low reset | Active-low reset | Connects to MCU NRST. Use a compatible open-drain reset signal. |
| H1-18 | 3.3 Power | Power | Connects to 3V3. Use the specified board power connection. |
| H1-19 | G Return | Return | Connects to the board’s ground plane. |
| H1-20 | G Return | Return | Connects to the board’s ground plane. |
| H2-1 | 3.3 Power | Power | Connects to 3V3. Use the specified board power connection. |
| H2-2 | G Return | Return | Connects to the board’s ground plane. |
| H2-3 | 5V Power | Power | Connects to 5V. Use the specified board power connection. |
| H2-4 | B9 Configurable I/O | Configurable I/O | Routes to MCU PB9. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-5 | B8 Configurable I/O | Configurable I/O | Routes to MCU PB8. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-6 | B7 Configurable I/O | Configurable I/O | Routes to MCU PB7. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-7 | B6 Configurable I/O | Configurable I/O | Routes to MCU PB6. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-8 | B5 Configurable I/O | Configurable I/O | Routes to MCU PB5. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-9 | B4 Configurable I/O | Configurable I/O | Routes to MCU PB4. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-10 | B3 Configurable I/O | Configurable I/O | Routes to MCU PB3. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-11 | A15 Configurable I/O | Configurable I/O | Routes to MCU PA15. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-12 | A12 Configurable I/O | Configurable I/O | Routes to MCU PA12. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-13 | A11 Configurable I/O | Configurable I/O | Routes to MCU PA11. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-14 | A10 Configurable I/O | Configurable I/O | Routes to MCU PA10. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-15 | A9 Configurable I/O | Configurable I/O | Routes to MCU PA9. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-16 | A8 Configurable I/O | Configurable I/O | Routes to MCU PA8. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-17 | B15 Configurable I/O | Configurable I/O | Routes to MCU PB15. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-18 | B14 Configurable I/O | Configurable I/O | Routes to MCU PB14. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-19 | B13 Configurable I/O | Configurable I/O | Routes to MCU PB13. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H2-20 | B12 Configurable I/O | Configurable I/O | Routes to MCU PB12. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H3-1 | 3V3 Power | Power | Connects to 3V3. Use the specified board power connection. |
| H3-2 | DIO Configurable I/O | Configurable I/O | Routes to MCU PA13. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H3-3 | CLK Configurable I/O | Configurable I/O | Routes to MCU PA14. Choose the applicable GPIO or peripheral function in the MCU documentation. |
| H3-4 | GND Return | Return | Connects to the board’s ground plane. |
| H4-1 | VBUS Power | Power | Connects to 5V. Use the specified board power connection. |
| H4-2 | D- Bidirectional | Bidirectional | USB data line. PCB net destination is PA11. |
| H4-3 | D+ Bidirectional | Bidirectional | USB data line. PCB net destination is PA12. |
| H4-4 | ID Unconfirmed | Unconfirmed | The board source supplies no net for this position. Consult the schematic before use. |
| H4-5 | GND Return | Return | Connects to the board’s ground plane. |
The timer’s update event requests the DMA transfer. PB6 carries the resulting compare output in the default mapping.
| Parameter | Limit | Conditions and source |
|---|---|---|
| Sample stream8-bit unsigned · 16 kHz | 8-bit unsigned · 16 kHz | The archived example stores the data in MCU Flash. A half-second clip uses approximately 8,000 samples. Original PWM audio project |
| DMA requestTIM4_UP → DMA1 channel 7 | TIM4_UP → DMA1 channel 7 | On STM32F103. Enable one request source on this DMA channel at a time. RM0008 Rev 21, Fig. 50 |
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.