Right done a little more investigation
Ran a logic analyzer on the Raspberry Pi and the RockPro64 ... and they both test back good ... the only difference is the speed.
https://imgur.com/wBBCYEA
Blinkt Initialization on the RockPro64 GPIO using SPI DAT = Pin 16\BCM23 CLK = Pin 18\BCM24
Looking into the source code of the Raspberry PI 3 their implementation of RPi.GPIO does not use the /sys/call/gpio interface.
The python GPIO library is a wrapper of a c library _GPIO.cpython-36m-aarch64-linux-gnu.so.
This library writes directly to the GPIO device in the SOC
/dev/gpiomem
/dev/mem
The process appears to consist of writing to some memory address space (semaphores/registers) to control the GPIO.
This is obviously a lot quicker and deterministic than trying to write to a file in Python.
Python R64.GPIO takes 530us to toggle a Clock cycle /sys/class/gpio equates to SPI Clock of 1.8 KHz
Python RPI.GPIO takes 4us to to toggle a Clock cycle /dev/gpiomem equates to a SPI Clock of 0.25MHz
People have tested the Blinkt up to 4MHz and 10MHz ... but there is not reports of a minimum clock speed!
Clearly the RockPro64 GPIO performance via Python R64\RP64.GPIO is just too slow to get teh SPI interface working.
I will have to see if the RK3399 has a faster way to program the GPIO
I will post my progress.
Ran a logic analyzer on the Raspberry Pi and the RockPro64 ... and they both test back good ... the only difference is the speed.
https://imgur.com/wBBCYEA
Blinkt Initialization on the RockPro64 GPIO using SPI DAT = Pin 16\BCM23 CLK = Pin 18\BCM24
Looking into the source code of the Raspberry PI 3 their implementation of RPi.GPIO does not use the /sys/call/gpio interface.
The python GPIO library is a wrapper of a c library _GPIO.cpython-36m-aarch64-linux-gnu.so.
This library writes directly to the GPIO device in the SOC
/dev/gpiomem
/dev/mem
The process appears to consist of writing to some memory address space (semaphores/registers) to control the GPIO.
This is obviously a lot quicker and deterministic than trying to write to a file in Python.
Python R64.GPIO takes 530us to toggle a Clock cycle /sys/class/gpio equates to SPI Clock of 1.8 KHz
Python RPI.GPIO takes 4us to to toggle a Clock cycle /dev/gpiomem equates to a SPI Clock of 0.25MHz
People have tested the Blinkt up to 4MHz and 10MHz ... but there is not reports of a minimum clock speed!
Clearly the RockPro64 GPIO performance via Python R64\RP64.GPIO is just too slow to get teh SPI interface working.
I will have to see if the RK3399 has a faster way to program the GPIO
I will post my progress.