Main Content

Troubleshoot BeagleBone Black PWM

Caution

Do not connect a PWM output pin directly to DGND. Grounding a PWM pin can damage the board. Insert a load resistor in series with components such as LEDs that do not present a resistive load.

Why Can I Not Configure my PWM?

Some of the internal PWMs are connected to two output pins: EHRPWM0A, EHRPWM0B, EHRPWM1A, EHRPWM1B, EHRPWM2A, and EHRPWM2B. The remaining pins, ECAPPWM0 and ECAPPWM2, are connected to one output pin.

You cannot configure more than one output pin at a time to a given internal PWM.

Why Can I Not Access My PWM Pins?

Alternative PWM fanouts PWM0A, PWM0B, PWM1A, PWM1B, PWM2A, and PWM2B share pins with HDMI, which is enabled by default. Use showPins to view the current pin usage. If HDMI is enabled, you cannot enable these pins using enablePWM. For information on how to disable HDMI, see the BeagleBone® Black hardware documentation.

Why Can I Not Configure PWM Frequency?

The MATLAB® Support Package for BeagleBone Black Hardware allows you to configure two PWM pins for the same PWM module. If you enable both pins from the same PWM module and you set the frequency to something other than 2 kHz, the PWM signal might behave unpredictably.

For more information, see https://randomlinuxhacks.wordpress.com/2014/09/16/changing-pwm-period-on-beaglebone-black/