Jump to content

JohnGO

Members
  • Posts

    13
  • Joined

  • Last visited

  1. JohnGO

    Pcduino Home

    Hi Igor, The picture for the pcduino2 is the pcduino1 not 2. pcduino2 For the pcduino3 (not nano), which model? B or (A or C) ? it's not the same (ethernet 100M for A and C, 1G for Link for the picture pcduino3A pcduino3B pcduino3C Best regards
  2. I found this link https://github.com/linksprite/a20/tree/master/patch/linux-sunxi
  3. Hi tkaiser, Thx for your answer. the fex file are the same (for SPI conf). The problem could be in the linksprite kernel : 3.4.079 and your's : 3.4.110?
  4. Hi Igor, Maybe I did'nt understand the configuration. For kernel 3.4.x., BY DEFAULT .fex, .dts and linux-sun7i-default.config are already configured and SPI works OR I must change anything? Thx
  5. I progress...but....This code works with Linksprite OS (ubuntu12.11) but not here. root@pcduino3nano:~/SPI/Pcduino_SPI# python3 Pcduino_SPI_example.py SPI device: /dev/spidev0.0 SPI speed: 12000000 SPI bits per word: 8 IOC_MESSAGE: 1075866368 IOC_TRANSFER: b'h\x9e\x98\xb6\x00\x00\x00\x00\x88\x97\x92\xb6\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Traceback (most recent call last): File "Pcduino_SPI_example.py", line 32, in <module> test(IODIRB, 0b00000000) File "Pcduino_SPI_example.py", line 27, in test spi.transfer([OPCODEW], 0) File "/root/SPI/Pcduino_SPI/Pcduino_SPI.py", line 497, in transfer fcntl.ioctl(self.handle, self._IOC_MESSAGE, spi_ioc_transfer) OSError: [Errno 22] Invalid argument Maybe the problem is here? The pin mode with LS OS : 10 : 1 11 : 2 12 : 0 13 : 2 With your's 'in' ou 'out': 10 : out 11 : in 12 : in 13 : in I can send my python code if you want. Thx a lot EDIT : With spi_test.c With LinkSprite Ubuntu 12.11 ('00 00 00' because nothing between MISO and MOSI) ubuntu@ubuntu:~/SPI$ ./spidev_test spi mode: 0 bits per word: 8 max speed: 500000 Hz (500 KHz) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 With Armbian root@pcduino3nano:~/SPI/Pcduino_SPI# ./spidev_test spi mode: 0 bits per word: 8 max speed: 500000 Hz (500 KHz) can't send spi message: Invalid argument Aborted EDIT2 : If I change spidev.h and add 1 line, the spidev_test.c is ok (but not my python ) BUT...if I add this line in LinkSprite Ubuntu12 the test fails !!! Anybody have an answer ???? /usr/include/linux/spi/spidev.h the struct in there is already written as you proposed: struct spi_ioc_transfer { __u64 tx_buf; __u64 rx_buf; __u32 len; __u32 speed_hz; __u16 delay_usecs; add -> __u16 interbyte_usecs; __u8 bits_per_word; __u8 cs_change; __u32 pad; /* If the contents of 'struct spi_ioc_transfer' ever change * incompatibly, then the ioctl number (currently 0) must change; * ioctls with constant size fields get a bit more in the way of * error checking than ones (like this) where that field varies. * * NOTE: struct layout is the same in 64bit and 32bit userspace. */ };
  6. Yep. I already saw this link but the link doesn't work..
  7. I've 3.4.x Could you give me a example in C or better for me in python? I'm trying with a MCP23S17 but for the moment....nothing... Thx
  8. Hi Igor, I've Pcduino 3, 3B, 3C and Nano. I just installed your OS on Nano
  9. Hi !!!!!!! Anybody try the SPI protocol (python or c)? Thx all for your future anwser
  10. Manually after boot look at this http://forum.armbian.com/index.php/topic/678-pcduino-image-and-gpio-support/?hl=python
  11. Cmd for gpio cd /sys/class/gpio echo X > export echo out > gpioX/direction echo 1 > gpioX/value
  12. JohnGO

    PcDuino ADC

    Hi Igor and everybody. No access for ADC ? I try "modprobe adc" but no module ADC Thx
  13. Hi Igor, I've a Pcduino 3 (not B or nano). Can you build an image for him? .FEX exists (https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a20/linksprite_pcduino3.fex) and I think the difference it's only a patch for GMAC. I'm newbee and I try to install your system on my board but I don't know how... I followed your post on Armbian...I created ' output ' but now? What am I doing? which files write on sdcard and how (dd?) May be I didn't see the tuto after to build image... Best regards JohnGO
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines