Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 1035|Reply: 1

Pi 3 H6 gpio : cannot get basic control of the output

[Copy link]

2

Threads

5

Posts

33

Credits

Novice

Rank: 1

Credits
33
Post time 2019-3-8 05:08:03 | Show all posts |Read mode
Edited by BrianG at 2019-3-9 20:57

Hi 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:-
  1. root@OrangePi:~# sudo echo 67 > /sys/class/gpio/export
  2. root@OrangePi:~# sudo echo out > /sys/class/gpio/gpio67/direction
  3. root@OrangePi:~# echo 0 > /sys/class/gpio/gpio67/value
  4. root@OrangePi:~# echo 1 > /sys/class/gpio/gpio67/value
  5. root@OrangePi:~# echo 0 > /sys/class/gpio/gpio67/value
Copy the Code
This 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
  1. root@OrangePi:~# cat /sys/kernel/debug/gpio
  2. GPIOs 0-255, platform/pio, pio:
  3. gpio-64  (sysfs               ) out hi
  4. gpio-67  (sysfs               ) out lo
  5. gpio-102 (?                   ) out hi
  6. gpio-113 (?                   ) out hi
  7. gpio-166 (sdc0 cd             ) in  lo
  8. gpio-226 (?                   ) out hi

  9. GPIOs 352-415, platform/r_pio, r_pio:
  10. gpio-356 (?                   ) out lo
  11. gpio-357 (?                   ) out hi
  12. gpio-359 (?                   ) out hi
  13. gpio-384 (wlan_hostwake       ) in  lo
  14. gpio-387 (wlan_regon          ) out hi
  15. gpio-388 (bt_rst              ) out lo
  16. root@OrangePi:~#
Copy the Code

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


This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

2

Threads

5

Posts

33

Credits

Novice

Rank: 1

Credits
33
 Author| Post time 2019-3-8 06:17:39 | Show all posts
I am also getting messages on the screen directly plugged into the Pi

  1. can't find function irq on pin 67
Copy the Code


I have tried the same test on a Armbian image on a ROCK 64 and that worked as anticipated.  
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-10-14 11:21 GMT+8 , Processed in 0.030939 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list