cdsteinkuehler / beaglebone-universal-io

Device tree overlay and support scripts for using most available hardware I/O on the BeagleBone without editing dts files or rebuilding the kernel
GNU General Public License v2.0
127 stars 54 forks source link

What happens to conflicting analog output pins? #13

Closed adityapatadia closed 9 years ago

adityapatadia commented 9 years ago

There are some pins on beaglebone which uses same PWM module. For example, P8_13 and P8_46 uses same EHRPWM2B module.

Now, I write "pwm" in ocp status of both pins and I also write "6" in /sys/class/pwm/export to export 6th pwm pin. Now if I change duty cycle of that 6th pwm, what will be effect on pin values? Will it give output on both pins?

cdsteinkuehler commented 9 years ago

The physical hardware can send the same signal to multiple pins if configured to do so. So if you configure EHRPWM2B to appear on two pins, you should get two identical outputs. You will not, however, get an "extra" pwm signal, the same signal will just appear twice and any changes will affect both outputs.

If you intend to rely on this behavior I suggest you both test the actual behavior and verify with TI what is supposed to happen when assigning the same signal to multiple pins. I suspect multiple outputs will work as expected, but assigning an input signal to multiple pins is specifically not supported per a note in section 2.2 of the data sheet (Ball Characteristics):

Note: Configuring two terminals to the same input signal is not supported as it can yield unexpected
results. This can be easily prevented with the proper software configuration.
adityapatadia commented 9 years ago

Ok, thanks for explanation. I will test it and post here.