|
Some findings to pass on:
WiringOP does not appear to have working PWM support at this time. I tested both the gpio app and the lib (via the pwm example program) and neither work due to missing H3 pin/mode configuration.
On my Orange PI PC, the GPIO PA5 PWM0 is accessible via the middle pin of the UART header. I could not get PWM0 or PWM1 working via the 40-pin header.
The Orange Pi header documentation and the OPI-PC schematics indicate that header pin 7 is H3 GPIO PA6 with PWM1 available on MUX 3, but the H3 datasheet v1.2 does not show PWM1 available on GPIO PA6, and setting PA6 to func 3 did not result in a PWM signal on pin 7.
The PWM0 function only appears to be available on the UART header (GPIO PA5: PWM0). The H3 datasheet shows the PWM function is also available on PL10, but the OPI-PC uses that pin for the power LED.
As to performance, I am evaluating the Orange Pi boards vs the Raspberry Pi 3 for GPIO at 1MHz+ speeds.
Here are my findings using C/assembly:
RPI3
===
~7.5ns : Set or clear up to 28 GPIO pins on 40-pin header. Setting some pins & clearing others takes 2x GPIO writes.
~52ns : Read the level of 28 GPIO pins on 40-pin header.
The RPI3 can bit-bang output to the GPIO at about 66MHz (using 2x GPIO writes to set and clear lines).
Reading is considerably slower at 19.2MHz.
Orange Pi PC (Armbian 5.14 Jessie 3.4.112 desktop)
========
~50ns: Set the level of all GPIO pins <on one port>.
~120ns: Read the level of all GPIO pins <on one port>.
The OPI-PC can bit-bang output to the GPIO at about 20MHz.
Reading is considerably slower at ~8MHz.
Because the OPI-PC uses GPIO from H3 ports A,C,D,G on the 40-pin header, it is very slow to read (4x 120ns) or write (4x 50ns) all 28 GPIO pins on the 40-pin header, and it is not possible to change them simultaneously.
-JB
twitter: @JBrooksBSI
|
|