-
Notifications
You must be signed in to change notification settings - Fork 13
eHRPWM
Description: The Pulse-Width Modulation Subsystem (PWMSS) consists of an instance of Enhanced High Resolution Pulse Width Modulator (eHRPWM), Enhanced Capture (eCAP), and Enhanced Quadrature Encoded Pulse (eQEP) modules. AM335x has 3-instances of PWMSS.
The eHRPWM is an effective PWM peripheral, able to generate complex pulse width waveforms with minimal CPU overhead or intervention. The ePWM module represents one complete PWM channel composed of two PWM outputs: EPWMA and EPWMB.
Dedicated 16 bit time-base with Period / Frequency control
- Two PWM outputs (EPWMA and EPWMB) that can be used in the following configurations
- Two independent PWM outputs with single-edge operation
- Two independent PWM outputs with dual-edge symmetric operation
- One independent PWM output with dual-edge asymmetric operation
- Programmable event prescaling minimizes CPU overhead on interrupts.
Link: https://github.com/beagleboard/linux/blob/4.4/drivers/pwm/pwm-tiehrpwm.c
Usage: Unlike the previous eHRPWM kernel driver, this version has gone through significant changes. First of all, the driver present in the /sys/class/pwm is now pwmchip%d, where %d is the subsystem id, which can be 0, 2, 4, 6 and 8. To enable both the pwmn channels in a specific subsystem you need to:
$cd /sys/class/pwm
$cd pwmchip0
$echo 0 > export
$echo 1 > export
Voila! you should see 2 PWM channels in the directory of the subsystem. The sysfs entries present are: