# PWM Example

## Overview

This sample exercises the PWM HAL with a focus on synchronous multi-channel output, dynamic frequency and duty-cycle changes, and readback verification.

Source file: `src/rtsmart/examples/peripheral/pwm/test_pwm.c`

## Default Setup

- Maps `PWM0` to `PIN42`
- Maps `PWM1` to `PIN43`

## Key APIs

- `drv_pwm_init()` / `drv_pwm_deinit()`
- `drv_pwm_set_freq()` / `drv_pwm_get_freq()`
- `drv_pwm_set_duty()` / `drv_pwm_get_duty()`
- `drv_pwm_enable()` / `drv_pwm_disable()`
- `drv_fpioa_set_pin_func()`

## Build and Run

```shell
cd src/rtsmart/examples/peripheral/pwm
make
./test_pwm
```

The sample has no command-line parameters.
