Pi 3 H6 gpio : cannot get basic control of the output
Edited by BrianG at 2019-3-9 20:57Hi All,
Kit: Orange Pi H6, 2GB with EMMC and an AD7606 8 channel ADC
Image: OrangePi_3_jessie_server_v1.0.img - this is pretty much as booted to reduce the possibility of me causing an issue.
I am working towards using the SPI interface on the Pi to link to the 8 channel ADC with the aim of bringing synchronized sample data onto the Pi. This will require the 4 SPI0 pins and probably 2 others - busy and reset.
Hardware is not really my area so I am starting by trying to get control of the gpio by trying the classic "blink" with an LED in line with a 330 ohm resistor. I've attached a photo. I have connected to pins 25(GND) and 24(PC3/gpio67) and run the following commands:-
root@OrangePi:~# sudo echo 67 > /sys/class/gpio/export
root@OrangePi:~# sudo echo out > /sys/class/gpio/gpio67/direction
root@OrangePi:~# echo 0 > /sys/class/gpio/gpio67/value
root@OrangePi:~# echo 1 > /sys/class/gpio/gpio67/value
root@OrangePi:~# echo 0 > /sys/class/gpio/gpio67/valueThis has generates no error messages and has no impact on the LED that remains bright at all times.
This is the output of config at the end of the above sequence
root@OrangePi:~# cat /sys/kernel/debug/gpio
GPIOs 0-255, platform/pio, pio:
gpio-64(sysfs ) out hi
gpio-67(sysfs ) out lo
gpio-102 (? ) out hi
gpio-113 (? ) out hi
gpio-166 (sdc0 cd ) inlo
gpio-226 (? ) out hi
GPIOs 352-415, platform/r_pio, r_pio:
gpio-356 (? ) out lo
gpio-357 (? ) out hi
gpio-359 (? ) out hi
gpio-384 (wlan_hostwake ) inlo
gpio-387 (wlan_regon ) out hi
gpio-388 (bt_rst ) out lo
root@OrangePi:~#
As you can see I have tried via pin 64 as well.
Additional Details
I think the problem here might be that I am not on the right pin mapping. I have been hunting around to find any sort of definition of the pins
[*] Pi Downloads has a user manual for One Plus. General concensus seems to be that the Pi3 H6 would maintain the mapping.
[*] WereCatFback in 2016 published a general mapping for a 40pin connector, some of which still seems valid
Based on the one plus schematics I put together the attached pin map and gpio addresses.
I tried PH3 / SPI_CE1 and got the following:-
[*]no error messages - including no console messages about interrupt functions
[*]I was able send values without errors
[*]sadly no blinking LED though
Is anyone able to confirm the pins and gpio addresses I generated?
Current State
I am stuck on this. Does anyone have any ideas on a way of moving forward? If I can't get past this then I am stuck with a board that is useless to me
I am also getting messages on the screen directly plugged into the Pi
can't find function irq on pin 67
I have tried the same test on a Armbian image on a ROCK 64 and that worked as anticipated.
page:
[1]