Jump to content

avdh

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by avdh

  1.   On 11/30/2019 at 4:18 PM, avdh said:

     

    On 11/30/2019 at 6:27 PM, martinayotte said:

    Maybe it is the program you were using that doesn't handle PC0 properly, because I've tested it using sysfs, and I was able to drive PC0 properly with a LED connected and it is also working without commenting SPI0 :

    
    echo 64 > /sys/class/gpio/export 
    echo out > /sys/class/gpio/gpio64/direction 
    echo 1 > /sys/class/gpio/gpio64/value 

     

    That  makes three different programs that fail to light led 64.

     

    The mystery has been solved now.  It is a hardware problem.

    I borrowed an identical Orange Pi One Plus, and the LED behaves as expected with all

    programs. Indeed there was no need to disable SPIO.  Frankly I expected so. My program worked on a very low level,

    and allowed to inspect the status of the io ports.

    gpio $48 + L@ H.
    0000,0000,7077,7771 OK
    gpio $58 + L@ H.
    0000,0000,0000,0040 OK
    $40 gpio-on
     OK
    gpio $58 + L@ H.
    0000,0000,0000,0041 OK

    You see that the first nibble of gpio[0x48] is 1 meaning output.

    After setting port 64 (0x40) on the zeroth bit of gpio[0x58] is 1, and the led is on.

     

    Again, thanks for the help.

    Groetjes Albert

  2. 18 hours ago, martinayotte said:

    No, some like those SPI pins are assigned for SPI purposes.

    Yes, you could decompile the DTB into DTS and remove the SPI node and its pins, and then recompile a new DTB.

    Apparently. I found an spi0 entry that uses exactly PC0/PC2/PC4 , the I/O's which don't work.

    RCS file: RCS/sun50i-h6-orangepi-one-plus.dts,v
    retrieving revision 1.1
    retrieving revision 1.2
    diff -r1.1 -r1.2
    473,477d472
    <             spi0-pins {
    <                 pins = "PC2\0PC3\0PC0\0PC5";
    <                 function = "spi0";
    <                 phandle = < 0x17 >;
    <             };

    The above is the change I made to the dts, then I recompiled and did a reboot (power cycle to be exact.)

     

    However this makes no difference, not to gpio, nor my test program. I have enough digital IO's to work with but I hate it that I don't know what is going on.

     

    By the way, amazing speed and accuracy of response. :)

     

    Groetjes Albert

  3. I have a similar problem with the Orange Pi One Plus.

     

    I can use gpio to get a display of the pins. I can test most all pins according to the instructions using

        gpio blink ##

    except i.a. PC0/SCLK.0/64 , pin 23 on the header. In the hardware schematic it is called SPI0_CLK and this can be found in the H6 V200 user manual page 385 where it has the alias PC0. This in turn agrees with the number 64 assigned by gpio. All pins that blink in gpio, also work in a small test program.

     

    So I tried to use dtc on the file I thought applicable : sun50i-h6-orangepi-one-plus.dtb.

    However there is no similar device 68000 and no clue what to disable.

     

    What concerns me the most is the following: I have disabled all devices of the armbian hardware list via armbian-config. I thought that that means that I can experiment freely with all the 26 pins on the header, but apparently that is not true.

    Any clues appreciated.

     

    Groetjes Albert

     

     

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines