Question on the RockPro64 RK3399 GPIOs...
#6
Hello,
I have been busy with the same problem for some time - Handling the GPIO pins directly in C.
According to my experience two steps are critical for enabling a pin:
-      Set the relevant multiplexer to GPIO function
-      Enable GPIO clock of this GPIO section. On my board, only GPIO1 is enabled by default. Maybe used for some other functions. Others require enabling.
Then, you need to set pin direction, according to intended usage as input or output.
While playing with GPIO on this board, I have met a problem of avoiding race conditions at some operations. Notable, when setting pin output state. So, I had to solve this in more systematic way, and finally written a small library of functions to operate GPIO on ROCKPro64. It is still in experimental phase and documentation is very ‘sparse’, but you may look in this coding, if you would like to see how I propose to operate GPIO. It is attached below.
I will be grateful for advices how to make it better!
Best regards,
Gienek.

.tar   GPIOsrc.tar (Size: 180 KB / Downloads: 433)


Messages In This Thread
RE: Question on the RockPro64 RK3399 GPIOs... - by Gienek - 09-02-2019, 03:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  ROCKPro64 Battery Power Supply hoarfrosty 12 2,057 04-01-2024, 10:24 PM
Last Post: nano2
  Powering on the Rockpro64 JPT223 1 911 09-24-2023, 12:23 PM
Last Post: hoarfrosty
  ROCKPro64 with 16 ports SATA controller ZeblodS 19 25,904 12-18-2022, 06:25 PM
Last Post: heyghoge
  Using RPI hat on RockPro64? misterc 0 860 12-16-2022, 02:05 PM
Last Post: misterc
  PCIe bifurcation support (on RK3399) Arn 1 1,345 11-28-2022, 05:12 PM
Last Post: tllim
  GPIO on the RockPro64 - all pins high? colinmarc 2 1,648 11-18-2022, 10:20 AM
Last Post: colinmarc
  ROCKPro64 DOA ajtravis 8 6,718 11-08-2022, 03:40 AM
Last Post: ajtravis
  RockPro64 not booting up mvicha@gmail.com 0 1,158 09-19-2022, 07:35 AM
Last Post: mvicha@gmail.com
  GPIO Expander HAT for ROCKPro64 and Quartz64 CounterPillow 7 5,449 07-18-2022, 10:05 PM
Last Post: zer0sig
  RockPro64 premium aluminium casing justwantin 2 2,180 05-27-2022, 06:51 PM
Last Post: justwantin

Forum Jump:


Users browsing this thread: 1 Guest(s)