[beagleboard] Figure out how to configure correctly modules, pins, and PRU to blink a led

2017-01-13 Thread ing4
Can anyone help me to point me what I am missing of blinking a led via PRU, please? I'd like to understand how to use PRUs in order to exploit them. So far, I'd be happy to start from blinking a led via PRU. After some struggling, I was able to run righto

[beagleboard] Re: Figure out how to configure correctly modules, pins, and PRU to blink a led

2017-01-16 Thread ing4
Hi Greg, Thank you for your reply! Friday, I found what I was doing wrong: I was using am335X-boneblack.dts instead of am335X-boneblack-emmc-overlay.dts. This wrong dts was pinmuxing my target pin to HDMI, and I was not able to exploit config-pin. Therefore, I edited am335X-boneblack-emmc-over

[beagleboard] Re: Figure out how to configure correctly modules, pins, and PRU to blink a led

2017-01-16 Thread ing4
Thank you, Greg! Device Tree was really confusing to me, probably due to the fact that I was using also examples from 3.8. By the way, I saw that you used an external ADC in your project, while I am scouting to use the internal ADC via PRU. May I ask why you did not use the internal ADC for yo

Re: [beagleboard] Re: Figure out how to configure correctly modules, pins, and PRU to blink a led

2017-01-17 Thread ing4
On Mon, Jan 16, 2017 at 9:55 AM, Greg wrote: > There was nothing particularly practical about that PRU-ADC project. It > was a means of learning PRU C programming, SPI bus, RemoteProc framework, > and user-space C code (and others). > It was an extremely good learning experience! I want to ap

Re: [beagleboard] Re: Figure out how to configure correctly modules, pins, and PRU to blink a led

2017-01-18 Thread ing4
On Mon, Jan 16, 2017 at 9:55 AM, Greg wrote: > I'm pretty sure that others have successfully accessed the internal ADCs > from the PRU. If you do some searching I think you can find a specific > instance. > I think it should be possible via the PRU's OCP master port. > So far, I found example

Re: [beagleboard] Re: Figure out how to configure correctly modules, pins, and PRU to blink a led

2017-01-23 Thread ing4
As far as I understood from the example, it should be enough to enable "OCP port" and point to TSC ADC registers (i.e. on-board/internal ADC registers) in order to configure and read values, am I right? Hence, I wrote down a header file (i.e. sys_tscadcss.h) which contains the structure that re

Re: [beagleboard] Re: Figure out how to configure correctly modules, pins, and PRU to blink a led

2017-01-31 Thread ing4
I did some step forward and I putted my header file on github . I hope that it could be helpfull :) One note: it is mandatory to power the TSC_ADC via PRCM or DT (i.e. device tree, I used the uio_pdru_genirq as suggested by zmatt). Now, I am experiencing that A

[beagleboard] ADC returns incorrect values

2017-02-01 Thread ing4
Hello! I am getting odd samples from TSC_ADC, definitely I am missing something. Can you help me to figure out what I am missing, please? I am using a beagle bone black industrial by element14, debian 8.6, code composer studio v7, and this header

[beagleboard] Re: ADC returns incorrect values

2017-02-01 Thread ing4
P.S. I double checked samples values by using BB-ADC as described here . However, values are still incorrect. For example, AIN0 returns 3870-ish, which should be instead 0 (as single-ended on GND ADC); AIN6 returns 3150-ish. -- F

[beagleboard] Re: ADC returns incorrect values

2017-02-02 Thread ing4
Finally, I figured out what was the issue... I thought that it was the ADC which had some damage, but actually ADC and software were fine; there were two issues in the 1.8V scaling circuit... ouch! Il giorno mercoledì 1 febbraio 2017 10:02:56 UTC+1, in...@orionitalia.com ha scritto: > > P.S. I