Jump to content

blprasad

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by blprasad

  1. Hi , I am trying to install headers on my orang pi using command #apt install linux-headers-$(uname -r) getting the following message Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-headers-5.4.27-sunxi E: Couldn't find any package by glob 'linux-headers-5.4.27-sunxi' E: Couldn't find any package by regex 'linux-headers-5.4.27-sunxi' could someone help me in how do I install headers ?, I am trying to comiple a kernel module. thanks
  2. exploring https://github.com/zhaolei/WiringOP/blob/h3/wiringPi/wiringPi.c
  3. I suspect it is "drivers/pinctrl/sunxi/pinctrl-sunxi.h" , not tried yet. Correct me know if I am wrong.
  4. Hi all , I am trying to work with GPIO , on Orange Pi zero latest kernel image (linux-sunxi-5.10.60). In old kernel linux-3.4.114 there used to be gpio_lib.h,gpio_lib.c files which are for this purpose as I know. Could someone help me find similar library in latest kernel sources. thanks
  5. Hi tparys, the module is loaded I checked it with "lsmod" list.
  6. Hi tparys, thanks for the prompt reply, I treid to verify whether the module is loaded or not, but I could not succeed, I will try again with more prinks.
  7. Orange Pi zero ,I am working on running toxic (tox protocol) client. On an old image with kernel 3.4.113 was able to compile custom module and load it. But with latest image with kernel 5.10.60 not able to load my custom kernel module , getting following error. " loading out-of-tree module taints kernel. module verification failed: signature and/or required key missing - tainting kernel " Another problem I am facing as follows ethernet eth0 repeatedly up/down ,I learn that this issue exists for the past few years now without any fix !!! Any inputs regarding these are appreciated , thanks in advance.
  8. ___ ____ _ _____ / _ \ _ __ __ _ _ __ __ _ ___ | _ \(_) |__ /___ _ __ ___ | | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | / // _ \ '__/ _ \ | |_| | | | (_| | | | | (_| | __/ | __/| | / /| __/ | | (_) | \___/|_| \__,_|_| |_|\__, |\___| |_| |_| /____\___|_| \___/ |___/ Welcome to ARMBIAN 5.36 user-built Ubuntu 16.04.3 LTS 3.4.113-sun8i System load: 0.37 0.16 0.07 Up time: 5 min Memory usage: 11 % of 241MB IP: CPU temp: 42�°C Usage of /: 98% of 1.8G I got as above when I login in to my orange pi0, It shows ARMBIAN 5.36!!!
  9. you need to use 3 uart overlays located in /boot/dtb/overlay by editing armbianEnv.txt and adding the following line, save and reboot : I did not find any "/boot/dtb/overlay" file on my orange pi zero. But I gave a try by editing armbianEnv.txt here are the contents: verbosity=7 console=both machid=1029 bootm_boot_mode=sec rootdev=UUID=7dd0c931-6f7e-4fbd-83f6-544d0e1b2765 rootfstype=ext4 overlays=uart1 uart2 uart3 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u saved the file ,and rebooted but I could not get any change , I could not understand why you mentioned uarts in overlay. Is it UARTs which took the control of PA13?. I thought it was SPI correct me if I am wrong in understanding.
  10. https://github.com/armbian/build/blob/master/config/fex/orangepizero.fex [spi1] spi_used = 1 spi_cs_bitmap = 1 spi_cs0 = port:PA13<2><1><default><default> spi_sclk = port:PA14<2><default><default><default> spi_mosi = port:PA15<2><default><default><default> spi_miso = port:PA16<2><default><default><default> After looking at above my understanding is that PA13 is not configured as gpio by default. so I tried to get PA13 as gpio by using overlay , after studying https://docs.armbian.com/Hardware_Allwinner_overlays/#overlay-pinmux-conflicts gave a try with .dts here is my overlay gpiotrail.dts file /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target = <&spi1>; __overlay__ { gpio: gpio { pins = "PA13"; function = "gpio_in"; bias-pull-up; }; }; }; I don't know that the above .dts is correct or not , I tried to it after searching for different examples on internet and I tried add this overlay as below root@orangepizero:~# armbian-add-overlay gpiotrail.dts Overlays are supported only on A10, A20, H3, H5 and A64 based boards then I got above message !!! , I am in desperate need of gpios, I don't know how to proceed. I have plans to recompile kernel by disabling spi1 in .fex, I tried to compile kernel few days ago but it's not compiling on my 32 bit host PC. so I need look for another approach. Please suggest if you have any Ideas.
  11. Sorry for delay in reply,debug port is UART0 the 3 pin header!!, I understood it wrongly,I thought it as UART3. So there is no UART3 as such?. I read orange pi has 3 UARTS ,so I wrongly expected them as UART1,UART2,UART3. Now I think they are UART0,UART1,UART2. If that is the case how this UART3 comes into picture?, I am only using default debug port i.e., UART0 for debugging, and I am not explicitly changing any settings or configuration of the board.I am trying to access the the GPIO normally with all default configuration of the board. I dont understand "UART3 overlay,since it use PA13 as UART3_TX ..." , please give more details. Correct me if I am wrong in my understanding.
  12. I may have to modify the overlay explicitly!!, any reference regarding that is appreciated.
  13. I am using debug port for debugging, now I expect that could be UART3 overlay. Is it? If I don't use it as debug port then will it automatically get converted into gpio?
  14. No ,I don't have much idea of what SPI1 overlay is,I am not using this pin for any other purpose, how can I make this pin work as normal GPIO?, how to disable the SPI and make work as GPIO. thanks for comment.
  15. I found mistake in my code I configured R1,and C4 both assigning same pin ,now I corrected it ,there comes some relief. C4 actually I connected to SUNXI_GPG(06) but my SUNXI_GPA(13) is not working at all ,it never goes HIGH. I used same logic to rest of the pins they work fine but this pirticular pin never worked so far.
  16. here are the gpios I am using for the purpose. #define R1 SUNXI_GPA(06) #define R2 SUNXI_GPA(00) #define R3 SUNXI_GPA(13) #define R4 SUNXI_GPA(10) #define C1 SUNXI_GPA(19) #define C2 SUNXI_GPA(07) #define C3 SUNXI_GPG(07) #define C4 SUNXI_GPA(06)
  17. Hi , I am finding trouble using orange pi gpios, here my approach I am trying to scan 4x4 kepad using gpio how am I writing 0 to a particular gpio pin? step 1 : sunxi_gpio_set_cfgpin(pin, SUNXI_GPIO_OUTPUT); step 2: sunxi_gpio_pullup(pin ,SUNXI_PULL_DOWN); I am not sure whether I am correct here. I am not sure if I have to use UP or DOWN or NONE here in pull up call,but I tried UP and DOWN so for. step 3: sunxi_gpio_output(pin,val); here I am using val = 0 or 1 making pin low and high depending on my requrement. in my attempts I get vague results as output. Please let me know if I am missing anything in my approach. to scan a particular colum I am making one column high(=1) and rest three columns to low (=0) at a time in loop. but I am unable to do it ,because though I write 0 to rest of the three , some of them still stay in high, because of this I am unable to get proper key scanned. Plese suggest how to resolve this. and I would also like to know , what is driver for gpio access ? is it linux-sunxi/drivers/gpio/gpio-sunxi.c ? Can I make it loadable module ?, if yes how to remove this module ,I mean what is the module name for this driver module. I want to modify the module according to my need,because ,I am getting unstable results while accessing gpio. Some gpios don't work as expected with gpio_lib.c . Has anyone faced samilar issue? am I the only one here?
  18. finally I am able to display text on LCD from Uboot. sunxi_gpio_set_cfgpin(pin,value); sunxi_gpio_output(); are working from Uboot code, these calls are placed in pinmux.c in uboot. sunxi_gpio_input() function is not present in pinmux.c so i copied it from gpio_lib.c and placed in pinmux.c thanks for inputs
  19. I have not tried hit any key method to stop auto boot.I have just read about it in google.I will give it a try.
  20. How do I boot Orange pi 0? , with Uboot only. I am trying to modify uboot.How can I test uboot prior to loading Linux. I mean I would like to break the booting process at uboot. Please help me.
  21. It seems API like sunxi_gpio_set_cfgpin(pin,value); sunxi_gpio_output(); seems to be working in Uboot as well as these were working in Linux, there is a dirver already included in Uboot sources. drivers/gpio/sunxi_gpio.c for accessing gpio.Need to experiment with Uboot.
  22. Hi all, I am using Orange Pi 0, I am trying to show some initial booting message on LCD. I am interfacing JHD204A which is a 20x4 charecter display.Which uses HD44780 controller. Is there a way to access Pi 0 GPIOs from Uboot? So that I want to show some initial message on L CD while Linux gets loaded. I appreciate any inputs, thanks in advance.
  23. Hi All, I am trying to use a 4x4 matrix keypad on Orange pi GPIO ,I am connecting the keypad with 8 GPIO's 4 GPIOs for rows, 4 for coloumns ,the problem I am facing is when I try to test the keypad few keys are read only on repeated attempts or pressing. The following is my code. Is this because of Hardware debouncing?. I don't have much knowledge on debouncing. I suspect there is a delay happening in reading and writing GPIOs , because of user process scheduling can be delayed. I don't think accesing GPIO at faster rate is not possible from user application. Please suggest me the best approach. Please suggest me where I am doing wrong. I appreciate any help, thanks in advance.
  24. I am using Pi GPIOs to drive the data lines of of LCD , the following are the details how am I using the GPIOs. #define _RS SUNXI_GPA(12) #define _RW SUNXI_GPA(16) #define _E SUNXI_GPA(11) #define _D4 SUNXI_GPA(01) #define _D5 SUNXI_GPA(02) #define _D6 SUNXI_GPA(03) #define _D7 SUNXI_GPA(15) #define _LED SUNXI_GPA(06) I am connecting GPIO pins on PI directly to corresponding pins on LCD. I am using jumper wires directly to connect them.I am not using any resistors inbetween ,except for LED and contrast pins of LCD. Finally I tried to use SUNXI_GPA(14) instead of SUNXI_GPA(02) the LCD worked as expected.Now I am getting "Hellow world " displayed on my LCD correctly. I dont know what is going wrong with SUNXI_GPA(02). The connections is are almosts same as the following picture execpt the PI board (Orange Pi zero in my case)
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines