Jump to content

OpenglMan

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by OpenglMan

  1. Well, the reboot problem is not an easy problem. Most of this boards with H3 H5 SoC inside, doesn't have a power management unit. This is the main problem. But there is a slightly dirty solution that you can do. Activate the reboot pin using a digital output. It will always work: You can also try the following tests: Maybe you can try to buy a power supply recommended by the manufacturer Finally you can try to copy the image of the SD card working using the dd command. For it, copy the SD card image to a pendrive using dd comand. Now, power on the unit with other SD card, and after that, copy the image in the usb unit to the eMMC: Something like that: dd if=/dev/sda of=/dev/mmcblk1 status=progress
  2. After more checks, the problem is about the pulse width. I mean, i am receiving a pulse wave in GPIO IRQ pin. If the width of the pulse is big, no problem ... all IRQs are right, but if the pulse width is very little, a lot of IRQ are not detected. The pulse with that i need to receive is only 20 useg So it is not a problem of frequency
  3. Hi, I have checked that the GPIO Interruptions are very slow. If i receive a wave in a GPIO with IRQ edge enable, for a frequency of 100Hz, all IRQs detected are right (100 interruptions received) However if i increase the frequency of the wave up to 500Hz, i can't detect all the IRQs received, (50 interruptions received more or less) Well, i think maybe, the solution is to change the following kernel parameter: CONFIG_HZ=1000 instead CONFIG_HZ=250 (default) What do you think ?? Is there other solution?? Thanks a lot in advance
  4. Hello, I would like to get RT Kernel, but i am not able to do it. I have downloaded the patch file: patch-5.4.19-rt11.patch And I copy this file in the following folder: build/userpatches/kernel/sunxi-current Now, I create the following file: build/userpatches/lib.config And i add this sentence: KERNELBRANCH='tag:v5.4.19' and I run compile.sh But it doesn't work. I think there are 2 different errors: one for compiling for an specific kernel version, and the other one for loading the RT patch file. Error 1: fatal: Couldn't find remote ref tags/v5.4.19 error: pathspec 'FETCH_HEAD' did not match any file(s) known to git. ... [ error ] ERROR in function compile_kernel [ compilation.sh:378 ] [ error ] Kernel was not built [ @host ] Error 2: [warn ] * [c] patch-5.4.19-rt11.patch [ failed ] Could you help me? Thanks a lot in advance
  5. I think i have found a dirty and very different solution but it works: I have created a service in systemd that is run before reboot.target The service created is: [Unit] Description=test Before=reboot.target DefaultDependencies=no [Service] ExecStart=/path_to_your_bash_file/file.sh Type=oneshot RemainAfterExit=yes [Install] WantedBy=reboot.target In the file.sh i activate a digital gpio pin for runnig a HW reset using the voltage regulators.
  6. Hello, I have the following problem: A custom board (H5) doesn't reboot using the reboot command. Same problem from u-boot using reset command. If you check the log, all is normal for the halt or power off proccess. The problem happens when the board is going to make the power on, it hangs, and you can't see anything using the debug serial. As a solution, i can reset the voltage regulators using a digital GPIO pin. Of this way i am able to reset the board. But i need a soft solution, and of course, if linux itself makes a reboot it should activate the digital GPIO pin in this custom board. So my question is: Would it be possible to recompile reboot.c or other file for activating a digital pin as last action of the reboot proccess? Thanks a lot in advance
  7. Hello, For a custom board using the H5 or H3 SoC, i would like to make the Calibration of the DDR3 chip. I think that the available information is very little. I will report here the steps I am taking. Anyway, I would greatly appreciate any information that could be provided to me. Thanks in advance
  8. Hello, For a custom board using the H5 or H3 SoC, i would like to make the Calibration of the DDR3 chip. I think that the available information is very little. I will report here the steps I am taking. Anyway, I would greatly appreciate any information that could be provided to me. Thanks in advance
  9. Solution for MIC not working in H5 Boards For H5 boards with Armbian Mainline Kernel, 4.19.67-sunxi64 #5.94 SMP Sun Aug 18 14:35:13 EDT 2019 aarch64 GNU/Linux The solution can be found at the end of this other following post... https://forum.armbian.com/topic/7216-orange-pi-zero-problem-with-onboard-soundcard/
  10. I have the same problem. Besides i have a LIME1 and Cubieboard2, and i have the same problem in both boards. Armbian mainline Kernel It seems an important fail. A solution can be to use Pulse. With Pulse installed, you can see Master and Capture controls if you type 'amixer' I also think there is probably an error with the devicetree definition. If not, maybe there is a problem in the driver sun4i_codec In 3.4 kernel, i can see: Simple mixer control 'Master',0 Capabilities: pvolume pvolume-joined penum Playback channels: Mono Limits: Playback 0 - 63 Mono: Playback 63 [100%] Simple mixer control 'Master Capture Mute',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'LineL',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'LineR',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Linein Pre-AMP',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 4 [57%] Simple mixer control 'Mic Input Mux',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 15 Mono: 0 [0%] Simple mixer control 'Mic Power',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'Mic1 Boost',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Mic1 gain',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 3 Mono: 0 [0%] Simple mixer control 'Mic2 Boost',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'Mic2 gain',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 4 [57%] Simple mixer control 'MicL',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 3 Mono: 1 [33%] Simple mixer control 'MicR',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 3 Mono: 3 [100%] Simple mixer control 'Playback',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'Capture',0 Capabilities: cvolume cvolume-joined penum Capture channels: Mono Limits: Capture 0 - 7 Mono: Capture 6 [86%] Simple mixer control 'ADC Input Mux',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 2 [29%] Simple mixer control 'Fm output',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 3 [43%] Simple mixer control 'FmL',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'FmR',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'LINEIN APM',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 0 [0%] Simple mixer control 'Ldac Left Mixer',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Ldac Right Mixer',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Left Capture Mute',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'MIC output volume',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 3 [43%] Simple mixer control 'Rdac Right Mixer',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Right Capture Mute',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] In mainline kernel I can see: Simple mixer control 'Left Mixer Left DAC',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Simple mixer control 'Power Amplifier',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 63 Mono: 45 [71%] [-18.00dB] Simple mixer control 'Power Amplifier DAC',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'Power Amplifier Mixer',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'Power Amplifier Mute',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'Right Mixer Left DAC',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Simple mixer control 'Right Mixer Right DAC',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Maybe the following link is related to this error: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/392419.html
  11. Hello, If you don't want to use HDMI, what configuration should be done in armbianEnv.txt or boot.cmd ? Thanks in advance
  12. Thank you guidol, I was running armbianmonitor -u, when Igor answered. Thank you very much Igor, it solved the problem with the sound card Regards
  13. Hello, After I run apt-get update and upgrade, I lose the sound card: aplay -l aplay: device_list:268: no soundcards found... If I check my upgrade history, I can see the following: cat /var/log/apt/history.log Start-Date: 2018-03-16 22:33:12 Commandline: apt-get upgrade Upgrade: libgssapi-krb5-2:armhf (1.12.1+dfsg-19+deb8u2, 1.12.1+dfsg-19+deb8u4), tzdata:armhf (2017b-0+deb8u1, 2018c-0+deb8u1), ncurses-term:armhf (5.9+20140913-1, 5.9+20140913-1+deb8u2), libkrb5-3:armhf (1.12.1+dfsg-19+deb8u2, 1.12.1+dfsg-19+deb8u4), libk5crypto3:armhf (1.12.1+dfsg-19+deb8u2, 1.12.1+dfsg-19+deb8u4), linux-image-next-sunxi:armhf (5.34, 5.41), armbian-firmware:armhf (5.34, 5.38), libcurl3:armhf (7.38.0-4+deb8u9, 7.38.0-4+deb8u10), openssh-sftp-server:armhf (6.7p1-5+deb8u3, 6.7p1-5+deb8u4), sudo:armhf (1.8.10p3-1+deb8u4, 1.8.10p3-1+deb8u5), linux-u-boot-lime-next:armhf (5.34, 5.38), openssh-server:armhf (6.7p1-5+deb8u3, 6.7p1-5+deb8u4), libkrb5support0:armhf (1.12.1+dfsg-19+deb8u2, 1.12.1+dfsg-19+deb8u4), hostapd:armhf (2.6-4~armbian5.34.171017+1, 2.6-4~armbian5.38+1), curl:armhf (7.38.0-4+deb8u9, 7.38.0-4+deb8u10), base-files:armhf (8+deb8u9, 8+deb8u10), libdb5.3:armhf (5.3.28-9, 5.3.28-9+deb8u1), ncurses-bin:armhf (5.9+20140913-1+b1, 5.9+20140913-1+deb8u2), linux-dtb-next-sunxi:armhf (5.34, 5.41), openssh-client:armhf (6.7p1-5+deb8u3, 6.7p1-5+deb8u4), libcurl3-gnutls:armhf (7.38.0-4+deb8u9, 7.38.0-4+deb8u10), armbian-tools-jessie:armhf (5.34, 5.38), sunxi-tools:armhf (1.4.2-1~armbian5.34.171017+1, 1.4.2-2~armbian5.38+1), libicu52:armhf (52.1-8+deb8u5, 52.1-8+deb8u6), linux-jessie-root-next-lime:armhf (5.34, 5.38), libtinfo5:armhf (5.9+20140913-1+b1, 5.9+20140913-1+deb8u2), libncursesw5:armhf (5.9+20140913-1+b1, 5.9+20140913-1+deb8u2), libncurses5:armhf (5.9+20140913-1+b1, 5.9+20140913-1+deb8u2), ncurses-base:armhf (5.9+20140913-1, 5.9+20140913-1+deb8u2) End-Date: 2018-03-16 22:36:11 In the following pictures you can see the modules of the system, before and after the upgrade process Why have I lost the sun4i_codec and snd_soc_core ? what can I do to enable the sound card again ? Thanks a lot in advance, Regards
  14. Check this: sudo cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins 1c20800.pinctrl maybe different in your system. Please check: sudo ls /sys/kernel/debug/pinctrl/ A good book about GPIO in Linux: GNU-Linux-Rapid-Embedded-Programming
  15. Thank you martinayotte for your answer. However i have found an alternative solution in PHP language that works pretty well. It barely consumes CPU. The code is very simple. Anyway I will try the code in c language that you indicated in your previous post. I imagine that the internal functioning will be similar in both solutions. If anyone is interested, check the following link: https://github.com/PacktPublishing/GNU-Linux-Rapid-Embedded-Programming/blob/master/Chapter06/gpio-poll.php Regards
  16. If you want to design a custom board you should use the A20 Soc or the H3 soc. Check the following useful link: http://linux-sunxi.org/Linux_mainlining_effort
  17. Hello, I need to use an IRQ interruption with a button. I mean, I push a button, and then a code is executed. Some information: The PIN is PH19, EINT19. and the board A20 SOM. Armbian SO, kernel 4.13 Firstly i configure the digital pin and IRQ from user space: echo 243 > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio243/direction echo "falling" > /sys/class/gpio/gpio243/edge Now, when I push the button, I can monitoring the IRQ and the counter related to cat /proc/interrupts But now, how can I run a program when the interruption event happens ? I have seen this useful link http://linux-sunxi.org/External_interrupts How can i use it? I think there is very few information about this issue. I executed a bash script with while true , and polling the digital pin, but the disadvantage is that it consumes a lot of cpu. I hope you can help me. Thank you very much in advance Regards
  18. Thank you very much, the whole process worked correctly
  19. Hello Igor, According to the previous link, i add the following code segment to the dts : &codec { status = "okay"; }; The dts file is located in: build/cache/sources/linux-mainline/linux-4.13.y/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts After that, i run compile.sh , but if i check the dts file again, i can't see the code segment that i added. So, how can i modify the device tree of the lime board or any other board? (mainline kernel) Thank you very much in advance
  20. The solution was found some time ago forum.armbian.com/index.php?/topic/4224-analog-audio-on-lime2-with-stable-kernel-version-49/
  21. Thank you Igor, I will check this information about Device Tree overlays
  22. Hello, I have just built an image with the default parameters of the Lime A20 board. It seems that the system does not detect any sound card. aplay -l aplay: device_list:268: no soundcards found... uname -a Linux lime 4.13.6-sunxi lsmod Module Size Used by cfg80211 376832 0 rfkill 20480 1 cfg80211 sun4i_gpadc_iio 16384 0 evdev 20480 1 at24 16384 0 sun4i_ts 16384 0 sun4i_gpadc 16384 0 nvmem_sunxi_sid 16384 0 sun4i_ss 24576 0 uio_pdrv_genirq 16384 0 uio 16384 1 uio_pdrv_genirq As you can see above, there is no module related to sound. If i use the same SD card with this image built in a Cubieboard2, i get the same error. Any advice would be greatly appreciated, Thanks in advance.
  23. Thanks martinayotte for your answer. Yes, It seems this pin is being used. I will use another pin. Thanks anyway
  24. Hello, I get an error when i try to use the PH5 pin as digital output. PH5 is the number 229 according to the following equation: (8-1)*32+5 = 229 echo 229 > /sys/class/gpio/export -bash: echo: write error: Device or resource busy If i use other pins like PH13, PH19, PH20 or PH21, all work correctly. For example, for PH13 as digital output: echo 237 > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio237/direction echo "1" > /sys/class/gpio/gpio237/value echo "0" > /sys/class/gpio/gpio237/value echo 237 > /sys/class/gpio/unexport I get the same error in the Cubieboard2 and the Lime A20 board. Can someone help me ? Thanks in advance
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines