[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-16 Thread TJF
PS:

If somebody knows a good protection circuity for the ADC inputs (ie OP-amp 
working with ADC Vref), please let me know.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/36a108ce-e55c-4e00-8be6-482a88363fe1o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-16 Thread TJF
Hi Andrew!

I've also seen frozen ADC. I guess (not confirmed yet) it's coming from 
negative Voltage on the input line.

I tried to disable and re-enable only the TSC_ADC_SS (while the rest of the 
system is running), to no avail. But after a system reset (warm-start) the 
ADC always runs well.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/45191737-96c5-43e2-8506-d3cbb59a740eo%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-14 Thread Andrew Harres
Thank you! It's coming along well. I ran into a strange issue today. I 
connected a 4-20ma sensor to the board and something strange happened. Now, 
this is probably induced by some sort of over voltage to the adc pin or 
something nasty going on, but after this event happened, the adc 
measurements froze (subsequent reads from the adc return the exact same 
number). So I tried restarting my program and it would hang on 
pruio_config(). I tried restarting libpruio-lkm.service with no luck. I 
think a big clue as to what happened is the fact that the heartbeat led 
stopped flashing. Eventually I power cycled the board and everything 
returned to normal. It seems like the pru's locked up (probably in response 
to an over-volt situation on an analog input)

On Friday, September 11, 2020 at 3:30:14 AM UTC-5 TJF wrote:

> Sorry, I forgot the second part of the command:
>
> *ExecStartPre=/bin/dash -c 'until [ -e /dev/uio5 ] ; do sleep 1 ; done ; 
>> /bin/chown root:pruio /dev/uio5'*
>>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/96f3038b-fc98-4592-9229-ece42ebaea16n%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-11 Thread TJF
Sorry, I forgot the second part of the command:

*ExecStartPre=/bin/dash -c 'until [ -e /dev/uio5 ] ; do sleep 1 ; done ; 
> /bin/chown root:pruio /dev/uio5'*
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/aa43f8ac-e3ae-4071-8497-c3a3f7f695f9o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-11 Thread TJF
Hi Andrew!

It seems that you're making good progress with your project. Congrats!

This works in my projects

[Unit]
> After=generic-board-startup.service libpruio-lkm.service
> StartLimitIntervalSec=0
>
> [Service]
> Type=simple
> Restart=always
> User=debian
> WorkingDirectory=/opt/rad/virtual_sensor 
>

> *ExecStartPre=/bin/dash -c 'until [ -e /dev/uio5 ] ; do sleep 1 ; done*
>
ExecStart=/opt/rad/virtual_sensor/virtual_sensor
>
> [Install]
> WantedBy=multi-user.target
>

Since I always execute compiled programs, I start them as root. Perhaps for 
User=debian you'll have to implement that line in 
/etc/systemd/system/lippruio-lkm.service.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c303aa65-f3c7-4871-a772-c8d8a9572636o%40googlegroups.com.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-10 Thread Andrew Harres
That's very clever, but it looks like the file exists before it's usable by 
libpruio. I tried ConditionPathIsReadWrite, but the file is readwritable 
before it's usable by libpruio as well. I noticed that the file permissions 
and group changes which seems to correlate with libpruio being able to use 
the file. Unfortunately, I don't see anything in the systemd documentation 
about file owner or permission conditions in service files.

On Thursday, September 10, 2020 at 2:21:02 PM UTC-5 RobertCNelson wrote:

> On Thu, Sep 10, 2020 at 1:55 PM Andrew Harres  wrote:
> >
> > Hello again!
> >
> > I'm trying to solve a minor problem. I made a systemd service which 
> starts my program automatically. My problem is that my program is starting 
> too early which causes this error:
> >
> > AssertionError: pruio_new failed (b'cannot open /dev/uio5')
> >
> >
> > The program will exit and the systemd service will keep restarting the 
> program until eventually (less than a minute) the program will run 
> successfully.
> >
> > Here is my systemd service file:
> >
> > [Unit]
> > After=generic-board-startup.service libpruio-lkm.service
> > StartLimitIntervalSec=0
> >
> > [Service]
> > Type=simple
> > Restart=always
> > User=debian
> > WorkingDirectory=/opt/rad/virtual_sensor
> > ExecStart=/opt/rad/virtual_sensor/virtual_sensor
> >
> > [Install]
> > WantedBy=multi-user.target
> >
> > I realize that since the libpruio-lkm service doesn't exit, putting it 
> in the 'after' section doesn't really make sense. Surely someone has dealt 
> with this problem before, but I couldn't find it while searching.
>
> Add this option to your service:
>
> ConditionPathExists=/dev/uio5
>
> Wish systemd had a wait for module option..
>
> Regards,
>
>
> -- 
> Robert Nelson
> https://rcn-ee.com/
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/78f4859b-e23e-4f82-8172-622034ffb23bn%40googlegroups.com.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-10 Thread Robert Nelson
On Thu, Sep 10, 2020 at 1:55 PM Andrew Harres  wrote:
>
> Hello again!
>
> I'm trying to solve a minor problem. I made a systemd service which starts my 
> program automatically. My problem is that my program is starting too early 
> which causes this error:
>
> AssertionError: pruio_new failed (b'cannot open /dev/uio5')
>
>
> The program will exit and the systemd service will keep restarting the 
> program until eventually (less than a minute) the program will run 
> successfully.
>
> Here is my systemd service file:
>
> [Unit]
> After=generic-board-startup.service libpruio-lkm.service
> StartLimitIntervalSec=0
>
> [Service]
> Type=simple
> Restart=always
> User=debian
> WorkingDirectory=/opt/rad/virtual_sensor
> ExecStart=/opt/rad/virtual_sensor/virtual_sensor
>
> [Install]
> WantedBy=multi-user.target
>
> I realize that since the libpruio-lkm service doesn't exit, putting it in the 
> 'after' section doesn't really make sense. Surely someone has dealt with this 
> problem before, but I couldn't find it while searching.

Add this option to your service:

ConditionPathExists=/dev/uio5

Wish systemd had a wait for module option..

Regards,


-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYhZwZUwgeuonNrCCJnzkWYa62Eb%3DxoF0nfMtMBYzPjiBA%40mail.gmail.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-10 Thread Andrew Harres
Hello again!

I'm trying to solve a minor problem. I made a systemd service which starts 
my program automatically. My problem is that my program is starting too 
early which causes this error:

AssertionError: pruio_new failed (b'cannot open /dev/uio5')


The program will exit and the systemd service will keep restarting the 
program until eventually (less than a minute) the program will run 
successfully.

Here is my systemd service file:

[Unit]
After=generic-board-startup.service libpruio-lkm.service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
User=debian
WorkingDirectory=/opt/rad/virtual_sensor
ExecStart=/opt/rad/virtual_sensor/virtual_sensor

[Install]
WantedBy=multi-user.target

I realize that since the libpruio-lkm service doesn't exit, putting it in 
the 'after' section doesn't really make sense. Surely someone has dealt 
with this problem before, but I couldn't find it while searching.
On Friday, August 21, 2020 at 1:49:01 AM UTC-5 TJF wrote:

> Am Donnerstag, 20. August 2020 20:27:41 UTC+2 schrieb andrew...@gmail.com:
>>
>> Sorry about that.
>>
>
>> My adc measurements are good and stable. My only issue now is that I 
>> can't seem to enable the serial port under libpruio. I'll post my code here:
>>
>
> Apology accepted.
>
> Fine, that ADC is OK. I hope your code calls the destructor 
> pruio_destroy() at the end.
>  
>
>> I tried every mode from 0 to 7 and got the same result.
>>
>
> You configured the hardware, but I guess you didn't care about the 
> software. Did you load the UArt kernel driver?
>
> When you configure pins from a device tree blob the kernel also loads the 
> matching driver. In contrast, libpruio doesn't inform the kernel about 
> changes. It's under your control to make this happen.
>
> If you're sure that you want Uart-1 on P9_24/P9_26, and that wont change, 
> then it's best to install a custom device tree blob for that two pins. 
> Check out the docs for section Custom overlay 
> .
>  
> You can use the tool src/config/dts_custom.bas 
> 
>  
> to create that blob in folder /lib/firmware. Your configuration (edit in 
> source and compile) should look like
>
> M(P9_24) = CHR(0)
>>
> M(P9_26) = CHR(0)
>>
>
> Perhaps you also want to adapt the file name. When the .dtbo file is in 
> place, edit /boot/uEnv.txt to load it and reboot.
>
> Regards
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6ef84d84-5d6b-4ed5-93ea-b9d8c588a95cn%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-21 Thread TJF
Am Donnerstag, 20. August 2020 20:27:41 UTC+2 schrieb andrew...@gmail.com:
>
> Sorry about that.
>

> My adc measurements are good and stable. My only issue now is that I can't 
> seem to enable the serial port under libpruio. I'll post my code here:
>

Apology accepted.

Fine, that ADC is OK. I hope your code calls the destructor pruio_destroy() 
at the end.
 

> I tried every mode from 0 to 7 and got the same result.
>

You configured the hardware, but I guess you didn't care about the 
software. Did you load the UArt kernel driver?

When you configure pins from a device tree blob the kernel also loads the 
matching driver. In contrast, libpruio doesn't inform the kernel about 
changes. It's under your control to make this happen.

If you're sure that you want Uart-1 on P9_24/P9_26, and that wont change, 
then it's best to install a custom device tree blob for that two pins. 
Check out the docs for section Custom overlay 
.
 
You can use the tool src/config/dts_custom.bas 

 
to create that blob in folder /lib/firmware. Your configuration (edit in 
source and compile) should look like

M(P9_24) = CHR(0)
>
M(P9_26) = CHR(0)
>

Perhaps you also want to adapt the file name. When the .dtbo file is in 
place, edit /boot/uEnv.txt to load it and reboot.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/dfa678c7-d2aa-48a0-94eb-38ce29718df3o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-20 Thread andrew . harres
My mistake. I had disabled the libpruio-lkm service while trying to 
troubleshoot the issue I'm having with the serial port. Sorry about that.

My adc measurements are good and stable. My only issue now is that I can't 
seem to enable the serial port under libpruio. I'll post my code here:

# serial_demo.py

from libpruio import *
import serial

io = pruio_new(PRUIO_ACT_FREMUX + PRUIO_ACT_ADC, 16, 0x98, 0)
IO = io.contents

if IO.Errr:
raise AssertionError("pruio_new failed (%s)" % IO.Errr)

if (IO.setPin(io, P9_24, 0)):
raise AssertionError("P9_24 configuration failed (%s)" % IO.Errr)

if (IO.setPin(io, P9_26, 0)):
raise AssertionError("P9_26 configuration failed (%s)" % IO.Errr)

if (pruio_config(io, 1, 0x1FE, 0, 4)):
raise AssertionError("config failed (%s)" % IO.Errr)

ser = serial.Serial('/dev/ttyS1', 9600)

When I try to run this code, I get an input/output error:
(env) debian@beaglebone:~/src/virtual_sensor$ python serial_demo.py
Traceback (most recent call last):
  File 
"/home/debian/src/virtual_sensor/env/lib/python3.5/site-packages/serial/serialposix.py"
, line 323, in _reconfigure_port
orig_attr = termios.tcgetattr(self.fd)
termios.error: (5, 'Input/output error')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "serial_demo.py", line 19, in 
ser = serial.Serial('/dev/ttyS1', 9600)
  File 
"/home/debian/src/virtual_sensor/env/lib/python3.5/site-packages/serial/serialutil.py"
, line 240, in __init__
self.open()
  File 
"/home/debian/src/virtual_sensor/env/lib/python3.5/site-packages/serial/serialposix.py"
, line 272, in open
self._reconfigure_port(force_update=True)
  File 
"/home/debian/src/virtual_sensor/env/lib/python3.5/site-packages/serial/serialposix.py"
, line 326, in _reconfigure_port
raise SerialException("Could not configure port: {}".format(msg))
serial.serialutil.SerialException: Could not configure port: (5, 'Input/output 
error')


I get a similar error if I try to open the serial port from picocom:
debian@beaglebone:~$ picocom /dev/ttyS1
picocom v1.7

...

FATAL: failed to add device /dev/ttyS1: Filedes is not a tty

debian@beaglebone:~$ ls -l /dev/ttyS*
crw--w 1 root tty 4, 64 Aug 20 18:03 /dev/ttyS0
crw-rw 1 root dialout 4, 65 Aug 20 18:03 /dev/ttyS1
crw-rw 1 root dialout 4, 66 Aug 20 18:03 /dev/ttyS2
crw-rw 1 root dialout 4, 67 Aug 20 18:03 /dev/ttyS3
crw-rw 1 root dialout 4, 68 Aug 20 18:03 /dev/ttyS4
crw-rw 1 root dialout 4, 69 Aug 20 18:03 /dev/ttyS5

debian@beaglebone:~$ groups
debian adm kmem dialout cdrom floppy audio dip video plugdev users 
systemd-journal 
input bluetooth netdev pruio cloud9ide xenomai weston-launch tisdk docker 
i2c iio spi admin remoteproc eqep pwm gpio

I tried every mode from 0 to 7 and got the same result.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9849648f-358f-487e-bf8e-af0724271cc9o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread TJF
Am Mittwoch, 19. August 2020 22:40:03 UTC+2 schrieb andrew...@gmail.com:
>
> I get this error when running your code. I can read the adc just fine.
>
> AssertionError: P9_24 configuration failed (b'pinmux missing')
>
>
Your system is not prepared for pinmuxing (check error messages 
).
 
Note: I did already mentinon this above.

The command lsmod should list (beside others)

Module  Size  Used by
> uio_pdrv_genirq16384  0
> libpruio   16384  0
> uio_pruss  16384  0
> uio20480  2 uio_pruss,uio_pdrv_genirq
>

The command systemctl status libpruio-lkm.service should output something 
like

● libpruio-lkm.service - Load libpruio loadable kernel module
>Loaded: loaded (/etc/systemd/system/libpruio-lkm.service; enabled; 
> vendor preset: enabled)
>Active: active (exited) since Thu 2020-08-13 20:57:24 CEST; 6 days ago
>   Process: 420 ExecStartPost=/bin/chown root:pruio 
> /sys/devices/platform/libpruio/state (code=exited, status=0/SUCCESS)
>   Process: 384 ExecStart=/sbin/modprobe libpruio (code=exited, 
> status=0/SUCCESS)
>  Main PID: 384 (code=exited, status=0/SUCCESS)
> Tasks: 0 (limit: 4915)
>CGroup: /system.slice/libpruio-lkm.service
>

Usually this should happen after you installed the libpruio-lkm.deb package 
and made yourself a member of the pruio system group.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6765146c-9cba-4bf1-aba4-ff65c04fe190o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread andrew . harres
I get this error when running your code. I can read the adc just fine.

AssertionError: P9_24 configuration failed (b'pinmux missing')

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2f86c928-b2e9-4158-9888-e4a6677d69aao%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread TJF
Am Mittwoch, 19. August 2020 21:56:23 UTC+2 schrieb andrew...@gmail.com:
>
> I can't find a reference to the setPin function in the python library
>

Check out example pruss_toggle.py 

.


> I assume I should be able to do this:
> from libpruio import *
>
> io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0)
>
> pruio_setPin(io, P9_24, 0)
>

That should work. I used a different syntax (don't know why -- perhaps to 
be closer to the other languages syntax):

from libpruio import * 
>
...
>
io = pruio_new 
> (PRUIO_DEF_ACTIVE,
>  
> 4, 0x98, 0)
> try:
>## The pointer dereferencing, using contents member
>IO = io.contents
>if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
>
...
>
  if (IO.setPin(io, P9_24, 0)):
> raise AssertionError("P9_24 configuration failed (%s)" % IO.Errr)
> ...
>
  if (pruio_config 
> (io,
>  
> 1, 0, 0, 0)):
> raise AssertionError("config failed (%s)" % IO.Errr)
> ...
>
 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c754404d-4735-4fef-8fe7-87c6d8bc5ed0o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread andrew . harres
I can't find a reference to the setPin function in the python library

I assume I should be able to do this:
from libpruio import *

io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0)

pruio_setPin(io, P9_24, 0)

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2fb7bef9-c66a-4141-96fa-2a550d47501ao%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread TJF
Am Dienstag, 18. August 2020 23:32:17 UTC+2 schrieb andrew...@gmail.com:
>
> I'm unable to use the config-pin:
> Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_24_pinmux/state
>

config-pin is based on the cape universal device tree blobs. They consime a 
lot of memory and slow down then boot process. You disabled them in uEnv.txt
.


> I know there is a way to configure gpios with the libpruio c library, but 
> I cannot find anything in the documentation about the uarts.
>

You can configure GPIOs, but also *any* other pin configuration. Set the 
required pins to their UART mode by libpruio and make sure that the 
matching driver is loaded (lsmod ...). Or configure the UART pins in a 
custom device tree blob (
http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/ChaPins.html#sSecCustom
).

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5ccdaece-aecb-4c0a-995a-9db9aec84b60o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-18 Thread andrew . harres
I'm having trouble using the uarts alongside libpruio. I assume this is due 
to the changes done to install libpruio.

I'm unable to use the config-pin:
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_24_pinmux/state

I know there is a way to configure gpios with the libpruio c library, but I 
cannot find anything in the documentation about the uarts.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c84790ba-4613-48d9-bbc5-1849f0d493a3o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-14 Thread Andrew Harres
That's it! These udev rules are the key. I was able to get this working on 
the original bone-debian-9.12-console image I was using.

This is what I did after installing a fresh image, updating, and adding the 
sources for libpruio

$ sudo apt install libpruio libpruio-dev python-pruio libpruio-lkm
$ sudo usermod -a -G pruio debian

edit /boot/uEnv.txt with the following changes (as for the first change, 
just comment out whichever uboot_overlay_pru parameter exists originally):
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
#enable_uboot_cape_universal=1

Finally, just make sure you have both udev rules pointed out in the last 
post. On my system, 84-gpio-nonroot.rules was missing.

On Thursday, August 13, 2020 at 1:55:23 PM UTC-5 TJF wrote:

> On my system I found the files
>
> # /etc/udev/rules.d/84-gpio-noroot.rules
>> #
>> # Corrects sys GPIO permissions on the BB so non-root users in the gpio 
>> group can manipulate bits
>> #
>> # Change group to gpio
>> KERNEL=="44e10800.pinmux", PROGRAM="/bin/sh -c '/bin/chown -R root:gpio 
>> /sys/kernel/debug/pinctrl/44e10800.pinmux'"
>> # Change user permissions to ensure user and group have read/write 
>> permissions
>> KERNEL=="44e10800.pinmux", PROGRAM="/bin/sh -c '/bin/chmod ugo+x 
>> /sys/kernel/debug; /bin/chmod -R ug+rw 
>> /sys/kernel/debug/pinctrl/44e10800.pinmux'"
>>
>
> and
>
> # /etc/udev/rules.d/85-gpio-noroot.rules
>> #
>> # Corrects sys GPIO permissions on the BB so non-root users in the gpio 
>> group can manipulate bits
>> #
>>
>> SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
>>
>
> adapting the permissions. I wonder why they're not present in all systems. 
> (Are they from the -bone flavour?)
>
> Regards
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/75f0f41f-d527-4be4-8b83-1fb253cc72e5n%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread TJF
On my system I found the files

# /etc/udev/rules.d/84-gpio-noroot.rules
> #
> # Corrects sys GPIO permissions on the BB so non-root users in the gpio 
> group can manipulate bits
> #
> # Change group to gpio
> KERNEL=="44e10800.pinmux", PROGRAM="/bin/sh -c '/bin/chown -R root:gpio 
> /sys/kernel/debug/pinctrl/44e10800.pinmux'"
> # Change user permissions to ensure user and group have read/write 
> permissions
> KERNEL=="44e10800.pinmux", PROGRAM="/bin/sh -c '/bin/chmod ugo+x 
> /sys/kernel/debug; /bin/chmod -R ug+rw 
> /sys/kernel/debug/pinctrl/44e10800.pinmux'"
>

and

# /etc/udev/rules.d/85-gpio-noroot.rules
> #
> # Corrects sys GPIO permissions on the BB so non-root users in the gpio 
> group can manipulate bits
> #
>
> SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
>

adapting the permissions. I wonder why they're not present in all systems. 
(Are they from the -bone flavour?)

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/f063a2ec-b43b-416f-af5f-823ae17a7d92o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread TJF
Thanks for the tip!

Am Donnerstag, 13. August 2020 15:47:14 UTC+2 schrieb Dennis Bieber:
>
> Try replacing that line with 
>
> sys.stdout.write("%4X " % AdcV[i]) 
>
> I've moved the space separator into the "..." format string. 
>
> .write() doesn't add line terminators, they are all up to the 
> coder to 
> put in. 
>
> Personally -- I'd probably replace all the "print" calls with 
> equivalent sys.stdout.write() (inserting the proper line ending \n where 
> needed). For "deliverable" packages I tend to save "print" for 
> development/debug tracing information -- one can easily identify what is 
> to 
> be removed when delivering the package.
>

The target is not to create perfect python code!

The target is to get users started. And therefore I try to present similar 
code in the syntax of three different programming languages.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e83e34b0-5427-4d37-aa93-1a189d9430dco%40googlegroups.com.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread TJF


Am Donnerstag, 13. August 2020 18:16:55 UTC+2 schrieb Andrew Harres:
>
> debian@beaglebone:~$ groups
> debian adm kmem dialout cdrom floppy audio dip video plugdev users 
> systemd-journal input bluetooth netdev cloud9ide xenomai weston-launch 
> tisdk docker i2c iio spi admin remoteproc eqep pwm gpio
>

The system group pruio is missing. It gets created when installing the 
libpruio-lkm.deb packege.

debian@beaglebone:~$ sudo chown root:gpio 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
>
> debian@beaglebone:~$ sudo chmod 664 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
>
> debian@beaglebone:~$ sudo ls -l 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
> -rw-rw-r-- 1 root gpio 0 Jan  1  1970 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
>
> debian@beaglebone:~$ cat 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
> cat: /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins: Permission 
> denied
>

Obviously also the folder needs permissions. Here's the folder chain on my 
system

dr-xr-xr-x  12 root root 0 Aug 13 19:40 sys
> rwxr-xr-x   10 root root 0 Aug 13 19:40 kernel
> drwx--x--x  41 root root 0 Jan  1  1970 debug
> drwxrwxr-x   2 root gpio 0 Jan  1  1970 44e10800.pinmux
>
 
Regarding ADC the example 1.py works now in python 2 and 3:

debian@beaglebone:~$ sudo python3 src/pruio_examples/1.py
> F940 EBD0 F4A0 88C0 58A0 9EB0 B6C0 F1E0
> F960 EE70 F510 C170 9600 91A0 9990 F200
> F950 EE10 F530 C630 A400 A0A0 A1D0 F1E0
> F970 EE30 F510 C680 A640 A470 A680 F1F0
> F990 EE10 F4E0 C680 A6B0 A5C0 A910 F200
> F990 EE30 F500 C660 A6B0 A630 AA10 F1E0
> F980 EE00 F4F0 C680 A660 A5D0 A980 F1C0
> F980 ED90 F4E0 C640 A590 A520 A8D0 F1D0
> F950 ED90 F510 C5F0 A520 A470 A7B0 F1B0
> F940 EDC0 F500 C5C0 A4F0 A420 A6B0 F1D0
> F960 EDA0 F4D0 C5C0 A4B0 A3B0 A630 F210
> F940 EDC0 F500 C5B0 A450 A370 A5C0 F1C0
> F940 EDF0 F4F0 C5D0 A4E0 A3C0 A5F0 F1B0
>

But you don't have pinmuxing feature yet.

   1. Try to install libpruio-lkm.deb package (command groups should list 
   the system group pruio afterwards).
   2. Make yourself a member in this group.
   3. Fix the permissions in path 
   /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins.
   4. Make uEnv.txt *NOT* loading the cape_universal stuff.
   
Then the AssertionError: pruio_new failed ('parsing kernel claims') should 
disappear and all members of group pruio should have pinmuxing capability 
from user space.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5dad1c89-3390-40cf-8bc9-00a728afde8bo%40googlegroups.com.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread Andrew Harres
debian@beaglebone:~$ uname -r
4.14.108-ti-r136

debian@beaglebone:~$ groups
debian adm kmem dialout cdrom floppy audio dip video plugdev users 
systemd-journal input bluetooth netdev cloud9ide xenomai weston-launch 
tisdk docker i2c iio spi admin remoteproc eqep pwm gpio

debian@beaglebone:~$ sudo chown root:gpio 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins

debian@beaglebone:~$ sudo chmod 664 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins

debian@beaglebone:~$ sudo ls -l 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
-rw-rw-r-- 1 root gpio 0 Jan  1  1970 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins

debian@beaglebone:~$ cat 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
cat: /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins: Permission 
denied

debian@beaglebone:~$ python3 src/pruio_examples/1.py
Traceback (most recent call last):
  File "src/pruio_examples/1.py", line 25, in 
if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
AssertionError: pruio_new failed (b'parsing kernel claims')


I'm back on the 4.14 kernel to get closer to what you have. I modified the 
pinmux-pins permissions to be just like yours. I'm already in the gpio 
group. What do your permissions look like for the whole directory structure 
leading up to pinmux-pins?

The 2to3 procedure worked perfectly for me as well: 

debian@beaglebone:~$ python3 src/pruio_examples/1.py
Traceback (most recent call last):
  File "src/pruio_examples/1.py", line 25, in 
if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
AssertionError: pruio_new failed (b'parsing kernel claims')

debian@beaglebone:~$ sudo python3 src/pruio_examples/1.py
F940 EBD0 F4A0 88C0 58A0 9EB0 B6C0 F1E0
F960 EE70 F510 C170 9600 91A0 9990 F200
F950 EE10 F530 C630 A400 A0A0 A1D0 F1E0
F970 EE30 F510 C680 A640 A470 A680 F1F0
F990 EE10 F4E0 C680 A6B0 A5C0 A910 F200
F990 EE30 F500 C660 A6B0 A630 AA10 F1E0
F980 EE00 F4F0 C680 A660 A5D0 A980 F1C0
F980 ED90 F4E0 C640 A590 A520 A8D0 F1D0
F950 ED90 F510 C5F0 A520 A470 A7B0 F1B0
F940 EDC0 F500 C5C0 A4F0 A420 A6B0 F1D0
F960 EDA0 F4D0 C5C0 A4B0 A3B0 A630 F210
F940 EDC0 F500 C5B0 A450 A370 A5C0 F1C0
F940 EDF0 F4F0 C5D0 A4E0 A3C0 A5F0 F1B0

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e80e6e61-263e-4a8d-904d-439b0263c510n%40googlegroups.com.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread jonnymo
You could try adding the following to your Python 2 script to add Python 3
print  support.
"from __future__ import print_function"

However, there should be an effort to move from Python 2 to Python 3.

Cheers,

Jon

On Thu, Aug 13, 2020 at 6:47 AM Dennis Lee Bieber 
wrote:

> On Wed, 12 Aug 2020 16:00:14 -0700 (PDT), in
> gmane.comp.hardware.beagleboard.user TJF
>  wrote:
>
> >I forgot to mention that the modified file doesn't work in python2 any
> more:
> >
> >src/test$ python 1.py
> >>   File "1.py", line 32
> >> print("%4X" % AdcV[i], end=" ") #output one channel in hex
> >>   ^
> >> SyntaxError: invalid syntax
> >>
> >>
> Without looking at the original source, I predict you were using
>
> print "%4X" % AdcV[i] ,
>
> where the trailing comma suppressed the automatic new-line of "print" and
> just left a trailing space. Try replacing that line with
>
> sys.stdout.write("%4X " % AdcV[i])
>
> I've moved the space separator into the "..." format string.
>
> .write() doesn't add line terminators, they are all up to the
> coder to
> put in.
>
> Personally -- I'd probably replace all the "print" calls with
> equivalent sys.stdout.write() (inserting the proper line ending \n where
> needed). For "deliverable" packages I tend to save "print" for
> development/debug tracing information -- one can easily identify what is to
> be removed when delivering the package.
>
>
> --
> Dennis L Bieber
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/6jgajf1aiseb5bc3e4h5ukmf5h367fl8ta%404ax.com
> .
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAG99bkrkJ3WAoifNR0bo8S%3DQP8nMTHafJujjndqxvMng-0_JGA%40mail.gmail.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread Dennis Lee Bieber
On Wed, 12 Aug 2020 16:00:14 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user TJF
 wrote:

>I forgot to mention that the modified file doesn't work in python2 any more:
>
>src/test$ python 1.py
>>   File "1.py", line 32
>> print("%4X" % AdcV[i], end=" ") #output one channel in hex
>>   ^
>> SyntaxError: invalid syntax
>>
>>  
Without looking at the original source, I predict you were using

print "%4X" % AdcV[i] ,

where the trailing comma suppressed the automatic new-line of "print" and
just left a trailing space. Try replacing that line with

sys.stdout.write("%4X " % AdcV[i])

I've moved the space separator into the "..." format string. 

.write() doesn't add line terminators, they are all up to the coder to
put in.

Personally -- I'd probably replace all the "print" calls with
equivalent sys.stdout.write() (inserting the proper line ending \n where
needed). For "deliverable" packages I tend to save "print" for
development/debug tracing information -- one can easily identify what is to
be removed when delivering the package.


-- 
Dennis L Bieber

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6jgajf1aiseb5bc3e4h5ukmf5h367fl8ta%404ax.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread TJF
I forgot to mention that the modified file doesn't work in python2 any more:

src/test$ python 1.py
>   File "1.py", line 32
> print("%4X" % AdcV[i], end=" ") #output one channel in hex
>   ^
> SyntaxError: invalid syntax
>
>  

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d0824dc4-514d-4a97-bde2-6dc728319841o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread TJF
I tried the tool Denis mentioned. It works:

libpruio/src$ cp python test 
>
libpruio/src$ 2to3 -w test
> root: Generating grammar tables from 
> /usr/lib/python2.7/lib2to3/PatternGrammar.txt
> root: Generating grammar tables from 
> /usr/lib/python2.7/lib2to3/PatternGrammar.txt
> root: Generating grammar tables from 
> /usr/lib/python2.7/lib2to3/PatternGrammar.txt
> root: Generating grammar tables from 
> /usr/lib/python2.7/lib2to3/PatternGrammar.txt
> ... 
>
RefactoringTool: Files that were modified:
> RefactoringTool: test/1.py
> RefactoringTool: test/button.py
> RefactoringTool: test/button2.py
> RefactoringTool: test/io_input.py
> RefactoringTool: test/performance.py
> RefactoringTool: test/pruss_add.py
> RefactoringTool: test/pruss_toggle.py
> RefactoringTool: test/pwm_cap.py
> RefactoringTool: test/qep.py
> RefactoringTool: test/rb_file.py
> RefactoringTool: test/sos.py
> RefactoringTool: test/stepper.py
> RefactoringTool: test/libpruio/__init__.py
> RefactoringTool: test/libpruio/ctypesloader.py
> RefactoringTool: test/libpruio/pruio.py
> libpruio/src$ cd test/
> libpruio/src/test$ python3 1.py
> F8F0 EC10 F470 83C0 55B0 9D60 BC80 F2D0 
> F970 EF50 F560 C630 9C00 93F0 9C30 F2C0 
> F980 EF00 F500 CCF0 AE40 A6E0 A5D0 F2F0 
> F9A0 EE90 F510 CD50 B0D0 AC00 AB50 F2B0 
> F950 EE40 F500 CC60 B070 ACE0 AC80 F2B0 
> F990 EE70 F4F0 CC70 B060 ACC0 ACD0 F2D0 
> F960 EE70 F540 CCA0 B0C0 ACD0 AD60 F300 
> F930 EEF0 F560 CD00 B1D0 ADD0 AED0 F2F0 
> F950 EF30 F530 CD10 B230 AEE0 B000 F2C0 
> F970 EEE0 F4E0 CD00 B210 AEB0 B050 F2A0 
> F980 EE90 F510 CD20 B1C0 AF20 B050 F2D0 
> F980 EEC0 F540 CD00 B240 AEE0 B030 F2F0 
> F960 EF50 F5A0 CDA0 B350 B100 B1A0 F2E0 
>  
>
 
 Regarding the pinmux-pins file permission: I've no clue why they're 
different on your systems. But you can adapt them, ie by adding a line to 
file /lib/systemd/system/libpruio-lkm.service like

ExecStartPost=/bin/chown root:pruio /sys/kernel/debug/pinctrl/
> 44e10800.pinmux-pinctrl-single/pinmux-pins
>
 
Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2c9e79b6-b495-4688-81ba-8087a1213b6bo%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread Andrew Harres
debian@beaglebone:~$ uname -r
5.4.52-ti-r16
debian@beaglebone:~$ sudo ls -l 
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-pins
-r--r--r-- 1 root root 0 Jan  1  1970 
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-pins

On Wednesday, August 12, 2020 at 4:17:34 PM UTC-5 Andrew Harres wrote:

> debian@beaglebone:~$ uname -r
> 4.19.94-ti-r45
> debian@beaglebone:~$ sudo ls -l 
> /sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-pins
> -r--r--r-- 1 root root 0 Jan  1  1970 
> /sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-pins
>
> On Wednesday, August 12, 2020 at 3:25:38 PM UTC-5 Andrew Harres wrote:
>
>> I set enable_uboot_cape_universal=0 and I have the same result. My 
>> permissions for pinmux-pins looks much different than yours.
>>
>> debian@beaglebone:~$ ls -l 
>> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
>> ls: cannot access 
>> '/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins': Permission denied
>> debian@beaglebone:~$ sudo ls -l 
>> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
>> -r--r--r-- 1 root root 0 Jan  1  1970 
>> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
>>
>> I'll try a different kernel.
>>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9230b892-6ee8-4c83-9d7d-c8b5f89ecaf6n%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread Andrew Harres
debian@beaglebone:~$ uname -r
4.19.94-ti-r45
debian@beaglebone:~$ sudo ls -l 
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-pins
-r--r--r-- 1 root root 0 Jan  1  1970 
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-pins

On Wednesday, August 12, 2020 at 3:25:38 PM UTC-5 Andrew Harres wrote:

> I set enable_uboot_cape_universal=0 and I have the same result. My 
> permissions for pinmux-pins looks much different than yours.
>
> debian@beaglebone:~$ ls -l 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
> ls: cannot access '/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins': 
> Permission denied
> debian@beaglebone:~$ sudo ls -l 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
> -r--r--r-- 1 root root 0 Jan  1  1970 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
>
> I'll try a different kernel.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5bd09148-7786-4f3d-a7d3-e4159b2db744n%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread Andrew Harres
I set enable_uboot_cape_universal=0 and I have the same result. My 
permissions for pinmux-pins looks much different than yours.

debian@beaglebone:~$ ls -l 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
ls: cannot access '/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins': 
Permission denied
debian@beaglebone:~$ sudo ls -l 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
-r--r--r-- 1 root root 0 Jan  1  1970 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins

I'll try a different kernel.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/13e708a5-6f31-47ab-8cde-7261ec54e56cn%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread TJF
I forgot:

$ python --version
> Python 2.7.13
> $ python3 --version
> Python 3.5.3
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/cc0bf2f1-c7ff-4f15-90f6-91ec6acacc7ao%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread TJF
I did some testing here on a similar system:

$ uname -r
> 4.14.69-ti-r76
> $ python 1.py
> F800 E9C0 F3B0 8230 5370 9830 B450 F2B0 
> F910 EEC0 F540 C600 9BA0 9230 9830 F2F0 
> F920 EEE0 F500 CC90 ABC0 A190 9FB0 F2E0 
> F960 EF20 F4B0 CDA0 AEF0 A6D0 A440 F2B0 
> F960 EEA0 F510 CDB0 B240 ACF0 AAF0 F300 
> F910 EEF0 F4E0 CDE0 B310 AEC0 AE50 F310 
> F960 EF00 F4D0 CDE0 B360 AF60 AFF0 F2F0 
> F980 EEF0 F500 CDC0 B340 B000 B0A0 F2E0 
> F960 EF20 F550 CE70 B4F0 B1F0 B330 F320 
> F950 EF00 F4E0 CED0 B530 B280 B480 F310 
> F980 EEE0 F4F0 CED0 B530 B300 B480 F2F0 
> F920 EEF0 F500 CE40 B4D0 B250 B410 F310 
> F940 EF00 F4D0 CE30 B450 B170 B340 F2C0 
> $ python3 1.py
> Traceback (most recent call last):
>   File "1.py", line 18, in 
> from libpruio import *
>   File "/home/debian/Projekte/libpruio/src/python/libpruio/__init__.py", 
> line 1, in 
> from pruio import *
> ImportError: No module named 'pruio' 
>
$ ls -l /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
> -rw-rw-r-- 1 root gpio 0 Jan  1  1970 
> /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
> $ cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
> Pinmux settings per pin
> Format: pin (name): mux_owner gpio_owner hog?
> pin 0 (PIN0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins 
> group pinmux_emmc_pins
> pin 1 (PIN1): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins 
> group pinmux_emmc_pins
> pin 2 (PIN2): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins 
> group pinmux_emmc_pins
> pin 3 (PIN3): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins 
> group pinmux_emmc_pins
> ...
>

 python2 works, python3 doesn't.

The file pinmux-pins is acessable for users of group gpio on my system. In 
your output the lines containing ocp:Px_xx_pinmux indicate that the 
cape-universal device-tree blob is loaded and claims the pins. Try 
enable_uboot_cape_universal=0 in uEnv.txt.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a4264e52-28bb-4e6b-a43b-2c31f47b90f4o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread Andrew Harres
I do not.

debian@beaglebone:~$ cat 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
cat: /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins: Permission 
denied

On Wednesday, August 12, 2020 at 12:42:04 PM UTC-5 TJF wrote:

> The pinmux-pins output is reasonable. Do you have read access to the file 
> from user space?
>
> Regarding the errors in ctypesloader.py: this isn't my code. I just 
> reduced code from the ctypes documentation to the bare minimum. Perhaps you 
> can try the original file?
>
> Regards
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ee8d027d-ad2f-4fad-a39d-982b5aa8b6afn%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread Dennis Lee Bieber
On Wed, 12 Aug 2020 10:20:35 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Andrew Harres
 wrote:


>def count(self, sub, start=0, end=sys.maxint):
>AttributeError: module 'sys' has no attribute 'maxint'

https://stackoverflow.com/questions/13795758/what-is-sys-maxint-in-python-3

Short answer: Python 3 unified the logic of native ints vs Python 2
"longints"; they automatically roll over to a longint if incremented far
enough. As a result, there isn't really a "maxint" anymore.


I'd suggest running the entire library through the 2 to 3 conversion
process.

https://docs.python.org/3.8/library/2to3.html
"""
except
Converts except X, T to except X as T.



renames
Changes sys.maxint to sys.maxsize.
"""

handle both of the cases you have encountered. There are MANY other changes
that may apply.



-- 
Dennis L Bieber

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/rha8jfph3crr8fq4l3e3n0nq9omo5p85mn%404ax.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread TJF
The pinmux-pins output is reasonable. Do you have read access to the file 
from user space?

Regarding the errors in ctypesloader.py: this isn't my code. I just reduced 
code from the ctypes documentation to the bare minimum. Perhaps you can try 
the original file?

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/23b526fd-8e7d-454c-979c-19462a645e87o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread Andrew Harres
I'm not sure about the differences between importing in python 2 vs 3. I'll 
look into it more. I did try running python3 interactively in the libpruio 
directory and tried an import directly.

debian@beaglebone:~/src/pruio_examples/libpruio$ ls
__init__.py   __pycache__  ctypesloader.pyc  pruio.pyc
__init__.pyc  ctypesloader.py  pruio.py
debian@beaglebone:~/src/pruio_examples/libpruio$ python3
Python 3.5.3 (default, Jul  9 2020, 13:00:10)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pruio
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/debian/src/pruio_examples/libpruio/pruio.py", line 3, in 

from ctypesloader import *
  File "/home/debian/src/pruio_examples/libpruio/ctypesloader.py", line 375
except OSError,e:
  ^
SyntaxError: invalid syntax

I think that line should read "except OSError as e:" to be valid python 3. 
I changed that and got another error.

debian@beaglebone:~/src/pruio_examples/libpruio$ vim ctypesloader.py
debian@beaglebone:~/src/pruio_examples/libpruio$ python3
Python 3.5.3 (default, Jul  9 2020, 13:00:10)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pruio
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/debian/src/pruio_examples/libpruio/pruio.py", line 3, in 

from ctypesloader import *
  File "/home/debian/src/pruio_examples/libpruio/ctypesloader.py", line 48, 
in 
class UserString:
  File "/home/debian/src/pruio_examples/libpruio/ctypesloader.py", line 
100, in UserString
def count(self, sub, start=0, end=sys.maxint):
AttributeError: module 'sys' has no attribute 'maxint'

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/67822a3e-476f-45ac-896f-7c455eb3cdb4n%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread Andrew Harres
I'm not sure what counts as reasonable.

debian@beaglebone:~$ sudo cat 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-p
ins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (PIN0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group 
pinmux_emmc_pins
pin 1 (PIN1): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group 
pinmux_emmc_pins
pin 2 (PIN2): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group 
pinmux_emmc_pins
pin 3 (PIN3): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group 
pinmux_emmc_pins
pin 4 (PIN4): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group 
pinmux_emmc_pins
pin 5 (PIN5): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group 
pinmux_emmc_pins
pin 6 (PIN6): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group 
pinmux_emmc_pins
pin 7 (PIN7): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group 
pinmux_emmc_pins
pin 8 (PIN8): ocp:P8_19_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_19_default_pin group pinmux_P8_19_default_pin
pin 9 (PIN9): ocp:P8_13_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_13_default_pin group pinmux_P8_13_default_pin
pin 10 (PIN10): ocp:P8_14_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_14_default_pin group pinmux_P8_14_default_pin
pin 11 (PIN11): ocp:P8_17_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_17_default_pin group pinmux_P8_17_default_pin
pin 12 (PIN12): ocp:P8_12_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_12_default_pin group pinmux_P8_12_default_pin
pin 13 (PIN13): ocp:P8_11_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_11_default_pin group pinmux_P8_11_default_pin
pin 14 (PIN14): ocp:P8_16_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_16_default_pin group pinmux_P8_16_default_pin
pin 15 (PIN15): ocp:P8_15_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_15_default_pin group pinmux_P8_15_default_pin
pin 16 (PIN16): ocp:P9_15_pinmux (GPIO UNCLAIMED) function 
pinmux_P9_15_default_pin group pinmux_P9_15_default_pin
pin 17 (PIN17): ocp:P9_23_pinmux (GPIO UNCLAIMED) function 
pinmux_P9_23_default_pin group pinmux_P9_23_default_pin
pin 18 (PIN18): ocp:P9_14_pinmux (GPIO UNCLAIMED) function 
pinmux_P9_14_default_pin group pinmux_P9_14_default_pin
pin 19 (PIN19): ocp:P9_16_pinmux (GPIO UNCLAIMED) function 
pinmux_P9_16_default_pin group pinmux_P9_16_default_pin
pin 20 (PIN20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 21 (PIN21): leds (GPIO UNCLAIMED) function user_leds_s0 group 
user_leds_s0
pin 22 (PIN22): leds (GPIO UNCLAIMED) function user_leds_s0 group 
user_leds_s0
pin 23 (PIN23): leds (GPIO UNCLAIMED) function user_leds_s0 group 
user_leds_s0
pin 24 (PIN24): leds (GPIO UNCLAIMED) function user_leds_s0 group 
user_leds_s0
pin 25 (PIN25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (PIN26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (PIN27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 28 (PIN28): ocp:P9_11_pinmux (GPIO UNCLAIMED) function 
pinmux_P9_11_default_pin group pinmux_P9_11_default_pin
pin 29 (PIN29): ocp:P9_13_pinmux (GPIO UNCLAIMED) function 
pinmux_P9_13_default_pin group pinmux_P9_13_default_pin
pin 30 (PIN30): ocp:P9_12_pinmux (GPIO UNCLAIMED) function 
pinmux_P9_12_default_pin group pinmux_P9_12_default_pin
pin 31 (PIN31): ocp:P8_26_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_26_default_pin group pinmux_P8_26_default_pin
pin 32 (PIN32): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins 
group pinmux_emmc_pins
pin 33 (PIN33): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins 
group pinmux_emmc_pins
pin 34 (PIN34): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 35 (PIN35): ocp:P8_18_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_18_default_pin group pinmux_P8_18_default_pin
pin 36 (PIN36): ocp:P8_07_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_07_default_pin group pinmux_P8_07_default_pin
pin 37 (PIN37): ocp:P8_08_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_08_default_pin group pinmux_P8_08_default_pin
pin 38 (PIN38): ocp:P8_10_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_10_default_pin group pinmux_P8_10_default_pin
pin 39 (PIN39): ocp:P8_09_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_09_default_pin group pinmux_P8_09_default_pin
pin 40 (PIN40): ocp:P8_45_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_45_default_pin group pinmux_P8_45_default_pin
pin 41 (PIN41): ocp:P8_46_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_46_default_pin group pinmux_P8_46_default_pin
pin 42 (PIN42): ocp:P8_43_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_43_default_pin group pinmux_P8_43_default_pin
pin 43 (PIN43): ocp:P8_44_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_44_default_pin group pinmux_P8_44_default_pin
pin 44 (PIN44): ocp:P8_41_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_41_default_pin group pinmux_P8_41_default_pin
pin 45 (PIN45): ocp:P8_42_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_42_default_pin group pinmux_P8_42_default_pin
pin 46 (PIN46): ocp:P8_39_pinmux (GPIO UNCLAIMED) function 
pinmux_P8_39_default_pin group pinmux_P8_39_default_pin
pin 47 (PIN47): ocp:P8_40_pinmux (GPIO 

[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread TJF
Hi Andrew!

First, the boot process seems to be OK. The driver uio_pruss as well as the 
libpruio-lkm are loading.

Am Mittwoch, 12. August 2020 17:40:45 UTC+2 schrieb Andrew Harres:
debian@beaglebone:~$ python src/pruio_examples/1.py

> Traceback (most recent call last):
>   File "src/pruio_examples/1.py", line 25, in 
> if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
> AssertionError: pruio_new failed (parsing kernel claims)
>
> This seems to be a kernel issue. Does the command cat 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins print anything 
reasonable?
 

> debian@beaglebone:~$ python3 src/pruio_examples/1.py
> Traceback (most recent call last):
>   File "src/pruio_examples/1.py", line 18, in 
> from libpruio import *
>   File "/home/debian/src/pruio_examples/libpruio/__init__.py", line 1, in 
> 
> from pruio import *
> ImportError: No module named 'pruio'
>
> Here the python interpreter cannot find the file pruio.py in folder 
/home/debian/src/pruio_examples/libpruio/. But it should be present since 
python2 did find it. (Is there any difference between python2 and python3 
regarding module import? Sorry, I'm not keen on python.)

Regards

PS: Google groups is really strange, it's a desaster!



-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/26fab7be-9df9-48bd-9cd3-a2f74ca889eeo%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread Andrew Harres
google groups has been strange. Looks like it has just updated and I don't 
see how to include code tags.

debian@beaglebone:~$ python --version
Python 2.7.13
debian@beaglebone:~$ python3 --version
Python 3.5.3

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/600265f2-41bd-4c05-82fc-ba9ef5792f94n%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-12 Thread andrew . harres
I didn't see cape_universal=enable in cmdline. I set uboot_overlay_pru to 
the UIO option. I also tried both commenting out enable_uboot_cape_universal
=1 and just setting it to 0. I get the same error as before.

debian@beaglebone:~$ cat /boot/uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.14.108-ti-r136
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: 
http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/.dtbo
#uboot_overlay_addr1=/lib/firmware/.dtbo
#uboot_overlay_addr2=/lib/firmware/.dtbo
#uboot_overlay_addr3=/lib/firmware/.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/.dtbo
#uboot_overlay_addr5=/lib/firmware/.dtbo
#uboot_overlay_addr6=/lib/firmware/.dtbo
#uboot_overlay_addr7=/lib/firmware/.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
#enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (6 = 384KB)
#uboot_fdt_buffer=0x6
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=
100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 
rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh


debian@beaglebone:~$ lsmod
Module  Size  Used by
pvrsrvkm  442368  0
spidev 20480  0
uio_pdrv_genirq16384  0
usb_f_acm  16384  2
u_serial   20480  3 usb_f_acm
usb_f_ncm  28672  2
usb_f_rndis32768  4
u_ether20480  2 usb_f_ncm,usb_f_rndis
libcomposite   65536  16 usb_f_acm,usb_f_ncm,usb_f_rndis
libpruio   16384  0
uio_pruss  16384  0
uio20480  2 uio_pruss,uio_pdrv_genirq

debian@beaglebone:~$ ls -l /dev/uio*
crw-rw 1 root users 244, 0 Aug 12 15:28 /dev/uio0
crw-rw 1 root users 244, 1 Aug 12 15:28 /dev/uio1
crw-rw 1 root users 244, 2 Aug 12 15:28 /dev/uio2
crw-rw 1 root users 244, 3 Aug 12 15:28 /dev/uio3
crw-rw 1 root users 244, 4 Aug 12 15:28 /dev/uio4
crw-rw 1 root users 244, 5 Aug 12 15:28 /dev/uio5
crw-rw 1 root users 244, 6 Aug 12 15:28 /dev/uio6
crw-rw 1 root users 244, 7 Aug 12 15:28 /dev/uio7

debian@beaglebone:~$ python src/pruio_examples/1.py
Traceback (most recent call last):
  File "src/pruio_examples/1.py", line 25, in 
if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
AssertionError: pruio_new failed (parsing kernel claims)

debian@beaglebone:~$ python3 src/pruio_examples/1.py
Traceback (most recent call last):
  File "src/pruio_examples/1.py", line 18, in 
from libpruio import *
  File "/home/debian/src/pruio_examples/libpruio/__init__.py", line 1, in 

from pruio import *
ImportError: No module named 'pruio'



On Tuesday, August 11, 2020 at 4:15:25 PM UTC-5, TJF wrote:
>
> Am Dienstag, 11. August 2020 21:24:48 UTC+2 schrieb andrew...@gmail.com:
>>
>> Is python 3 not supported?
>>
>
> AFAIR I tested on python 2 and 3.
>
> The message
>
> (cannot open /dev/uio5)
>>
>
> is related to the uio_pruss driver. The interupt handler is either not 
> present (command lsmod doesn't list uio_pruss, or command ls -l /dev/uio* 
> has no output). Or you don't have write access to that file.
>
> In any case you need to load the adapted uEnv.txt (uboot_overlay_pru 
> modification). And it's also recommended to remove cape_universal=enable 
> from the cmdline in order to get free pinmux access to all pins from user 
> space.
>
> Regards
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a7a30031-5651-4931-9662-c55546b44649o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-11 Thread TJF
Am Dienstag, 11. August 2020 21:24:48 UTC+2 schrieb andrew...@gmail.com:
>
> Is python 3 not supported?
>

AFAIR I tested on python 2 and 3.

The message

(cannot open /dev/uio5)
>

is related to the uio_pruss driver. The interupt handler is either not 
present (command lsmod doesn't list uio_pruss, or command ls -l /dev/uio* 
has no output). Or you don't have write access to that file.

In any case you need to load the adapted uEnv.txt (uboot_overlay_pru 
modification). And it's also recommended to remove cape_universal=enable 
from the cmdline in order to get free pinmux access to all pins from user 
space.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/18e96c47-40b3-4915-b181-e2375cf9c486o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-11 Thread andrew . harres
I actually already had it installed. I tried running it again in python 2 
without the uboot_overlay_pru modification and get this:

debian@beaglebone:~$ python src/pruio_examples/1.py
destructor warning: constructor failed
Traceback (most recent call last):
  File "src/pruio_examples/1.py", line 25, in 
if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
AssertionError: pruio_new failed (cannot open /dev/uio5)

Is python 3 not supported?

On Tuesday, August 11, 2020 at 12:59:24 PM UTC-5, TJF wrote:
>
> Am Dienstag, 11. August 2020 18:19:13 UTC+2 schrieb andrew...@gmail.com:
>>
>> I've installed libpruio, python-pruio, libpruio-lkm, and libpruio-doc. 
>>
> ...
>> Is there something I'm missing?
>>
>
> AFAIR the python interpreter (ctypes) also needs the dev-package to bind 
> the library: libpruio-dev
>
> Regards
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7aa4a809-79e4-4fa0-9f36-cf2341ed6510o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-11 Thread TJF
Am Dienstag, 11. August 2020 18:19:13 UTC+2 schrieb andrew...@gmail.com:
>
> I've installed libpruio, python-pruio, libpruio-lkm, and libpruio-doc. 
>
...
> Is there something I'm missing?
>

AFAIR the python interpreter (ctypes) also needs the dev-package to bind 
the library: libpruio-dev

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5bcad34f-b81f-45be-8d7c-956cc5997cbco%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-11 Thread andrew . harres
I edited /boot/uEnv.txt:

###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###

I then tried running with python 2 after rebooting:

debian@beaglebone:~/src/pruio_examples$ python 1.py
Traceback (most recent call last):
  File "1.py", line 25, in 
if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
AssertionError: pruio_new failed (parsing kernel claims)


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/0427a382-5fc0-41f0-a0eb-b9b6b1956629o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-11 Thread andrew . harres
I'm having an issue running the python examples.

I'm running the bone-debian-9.12-console image.
I've installed libpruio, python-pruio, libpruio-lkm, and libpruio-doc.
I copied the python-pruio examples into my home directory and try to run an 
example:

debian@beaglebone:~/src/pruio_examples$ python3 1.py
Traceback (most recent call last):
  File "1.py", line 18, in 
from libpruio import *
  File "/home/debian/src/pruio_examples/libpruio/__init__.py", line 1, in 

from pruio import *
ImportError: No module named 'pruio'

Is there something I'm missing?

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6eb11c14-843b-4740-805a-49573720fd4co%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-26 Thread TJF
Hi Thomas!

Check out the ring buffer mode 
.
 
Find example code in rb_file (.c, .py, .bas) 

 
or rb_oszi (.bas) 

.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/40c47ae9-5736-4f80-888c-84aa7507c42c%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-26 Thread Thomas Wagner
Hi guys, it is me again ... :D

I finally got to continue my project and got libpruio running sampling some 
happy ADC-values. In my use-case it would be optimal to have some kind of 
continuous sampling with a given sampling rate (something slow, 1KHz..10Hz) 
that should be timed precise, so in the best case PRU only. Looking at 
"PruIo::config" I only see an option to sample a fixed amount of samples 
which means I would have to trigger another run manually from the host 
ARM-program. Is there a way to implement some kind of continuous sampling? 
If so, could someone point me in the right direction? Thanks :)

Greetings
Thomas

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e0da77f8-269e-4979-a5cc-cc33ebb4ea33%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-13 Thread TJF
Hi!

By any reason the key file signing got lost. I re-signed it. It should be 
OK now.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7c1536f3-e725-4fa5-90ba-7c6b8edd9fae%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-13 Thread wagnerth95
Hi guys,

I hope I found the right place to post this question, google groups looks 
somewhat confusing to me :D

I just tried to install libpruio as described in the wiki downloading and 
installing the key and adding the repositories. Updating the repositories 
sadly causes an error:

sudo apt update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://deb.debian.org/debian stretch-updates InRelease
Hit:3 http://deb.debian.org/debian-security stretch/updates InRelease
Ign:4 http://beagle.tuks.nl/debian jessie/ InRelease
Hit:5 http://deb.debian.org/debian stretch Release   
Get:6 http://beagle.tuks.nl/debian jessie/ Release [1,586 B] 
Get:7 http://beagle.tuks.nl/debian jessie/ Release.gpg [543 B] 
   
Hit:8 http://repos.rcn-ee.com/debian stretch InRelease 
 
Ign:7 http://beagle.tuks.nl/debian jessie/ Release.gpg
Reading package lists... Done  
W: GPG error: http://beagle.tuks.nl/debian jessie/ Release: The following 
signatures were invalid: A76E9815117798B563EC51A7FBA956CCF84E5437
E: The repository 'http://beagle.tuks.nl/debian jessie/ Release' is not 
signed.
N: Updating from such a repository can't be done securely, and is therefore 
disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration 
details.

After some searching I found a solution suggesting to put [trusted=yes] in 
front of the repo-urls which resolves some of the errors but something 
seems off still:

sudo apt 
update  
Ign:1 http://deb.debian.org/debian stretch InRelease
Ign:2 http://beagle.tuks.nl/debian jessie/ InRelease  
Hit:3 http://deb.debian.org/debian stretch-updates InRelease  
Hit:4 http://deb.debian.org/debian-security stretch/updates InRelease 
Get:5 http://beagle.tuks.nl/debian jessie/ Release [1,586 B]  
Hit:6 http://deb.debian.org/debian stretch Release   
Get:7 http://beagle.tuks.nl/debian jessie/ Release.gpg [543 B]   
Hit:8 http://repos.rcn-ee.com/debian stretch 
InRelease  
Ign:7 http://beagle.tuks.nl/debian jessie/ Release.gpg
Get:10 http://beagle.tuks.nl/debian jessie/ Sources [3,442 B]
Get:11 http://beagle.tuks.nl/debian jessie/ Packages [6,423 B]
Fetched 12.0 kB in 5s (2,232 
B/s)
Reading package lists... Done
Building dependency tree   
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
W: GPG error: http://beagle.tuks.nl/debian jessie/ Release: The following 
signatures were invalid: A76E9815117798B563EC51A7FBA956CCF84E5437

Is there anything off on my end? Wuuld be grateful for any help as I don't 
know too much about package signatures, keys etc. ...

Grettings
Thomas

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/85ccf17e-7f25-4e63-a159-877a81e20de1%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-13 Thread wagnerth95
.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a3ef540e-36d4-49ef-9d97-da2cff181a06%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-05 Thread Hans Leeuw


Op dinsdag 5 mei 2020 07:13:43 UTC+2 schreef TJF:
>
> Hi Hans!
>
> Am Dienstag, 5. Mai 2020 00:47:22 UTC+2 schrieb Hans Leeuw:
>>
>> I have upgraded and I get this warning while compiling my program (using 
>> rb):
>>
>
> I avoid updates, if possible. It takes too much time to optimize the boot 
> time again and again.
>
I will too once I have found my optimum configuration ;-). Still looking 
for it though. I am now trying to be careful in documenting each step, so 
it won't be such a hassle the next time.

>  
>
>> /usr/bin/ld: warning: libtinfo.so.5, needed by 
>> /usr/lib/gcc/arm-linux-gnueabihf/8/../../../libpruio.so, may conflict with 
>> libtinfo.so.6
>>
>> (4.19.94-bone44), buster.
>>
>
> This library isn't much important. It gets linked due to a single PRINT 
> statement at the end of the destructor, sending a message to the error 
> channel, if any. (Since the PruIo instance is destroyed after the DTOR, the 
> variable Errr cannot get used in that case.)
>
Good to hear, I was just informing you.
Op dinsdag 5 mei 2020 07:34:57 UTC+2 schreef TJF:
>
> PS:
>
> From my point of view, I as a developer should not provide the packages.
>
> It'd be best to include libpruio in RCNs build farm, in order to get a 
> fresh binary for each new update. He startet that project, but never 
> finished jet. I don't know why.
>
> Perhaps libpruio users should motivate him to continue. (I'm ready for 
> supporting, if necessary.)
>
If my power stretches that far I will gladly support that. libpruio is 
great for precise timing applications. I will certainly recommend it in my 
niche. Do you have a clue how many people use it?

Best, Hans.


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/de7c1a74-571d-4a34-baac-96459b38860b%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-04 Thread TJF
PS:

>From my point of view, I as a developer should not provide the packages.

It'd be best to include libpruio in RCNs build farm, in order to get a 
fresh binary for each new update. He startet that project, but never 
finished jet. I don't know why.

Perhaps libpruio users should motivate him to continue. (I'm ready for 
supporting, if necessary.)

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/8137fe11-b28d-4643-815c-349588fd6457%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-04 Thread TJF
Hi Hans!

Am Dienstag, 5. Mai 2020 00:47:22 UTC+2 schrieb Hans Leeuw:
>
> I have upgraded and I get this warning while compiling my program (using 
> rb):
>

I avoid updates, if possible. It takes too much time to optimize the boot 
time again and again.
 

> /usr/bin/ld: warning: libtinfo.so.5, needed by 
> /usr/lib/gcc/arm-linux-gnueabihf/8/../../../libpruio.so, may conflict with 
> libtinfo.so.6
>
> (4.19.94-bone44), buster.
>

This library isn't much important. It gets linked due to a single PRINT 
statement at the end of the destructor, sending a message to the error 
channel, if any. (Since the PruIo instance is destroyed after the DTOR, the 
variable Errr cannot get used in that case.)

It's much likely that you can ignore the linker warning.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/4562aff2-01eb-4d8a-b52d-21e915494543%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-05-04 Thread Hans Leeuw
Hi TJF,

I have upgraded and I get this warning while compiling my program (using 
rb):

/usr/bin/ld: warning: libtinfo.so.5, needed by 
/usr/lib/gcc/arm-linux-gnueabihf/8/../../../libpruio.so, may conflict with 
libtinfo.so.6

(4.19.94-bone44), buster.

For the rest it seems to work fine.

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/480e15d1-a779-4441-851c-ac6eee59b52b%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-10 Thread Hans Leeuw
Ok, finally solved. How to keep yourself busy ;-).

Installing through dkpg didn't work but the --ignore-depends gave me the 
hunch to look for something similar for the authentication key, and there 
is:
https://askubuntu.com/questions/732985/force-update-from-unsigned-repository
adding trusted=yes did the trick and I could install using the normal 
procedure described on the libpruio pages.

deb [trusted=yes] http://beagle.tuks.nl/debian jessie/

deb-src [trusted=yes] http://beagle.tuks.nl/debian jessie/

Thanks for thinking with me.

Best, Hans.

Op dinsdag 10 maart 2020 16:54:31 UTC+1 schreef Hans Leeuw:
>
> Never a dull moment. The package needs dkms and updating that package 
> gives problems. installing recursively also asks for libpruio itself. I can 
> probably ignore that by using --ignore-depends=libpruio?
>
> Sorry for bothering again.
>
> Best, Hans.
>
>
> Op dinsdag 10 maart 2020 15:18:21 UTC+1 schreef Hans Leeuw:
>>
>> Hi Thomas,
>>
>> I managed, but I had to override authentication (from 
>> stretch, 4.14.108-ti-r127) to be able to download. There was a bunch of 
>> errors and messages on the way:
>>
>> debian@beaglebone:/var/lib/cloud9$ sudo apt-get update
>> Ign:1 http://beagle.tuks.nl/debian jessie/ InRelease
>> Get:2 http://beagle.tuks.nl/debian jessie/ Release [1,586 B] 
>>
>> Ign:3 http://deb.debian.org/debian stretch InRelease 
>> 
>> Hit:4 http://deb.debian.org/debian stretch-updates InRelease  
>> Hit:5 http://deb.debian.org/debian-security stretch/updates InRelease 
>> Get:6 http://beagle.tuks.nl/debian jessie/ Release.gpg [543 B]
>> Hit:7 http://deb.debian.org/debian stretch Release
>> Hit:8 http://repos.rcn-ee.com/debian stretch InRelease
>> Ign:6 http://beagle.tuks.nl/debian jessie/ Release.gpg
>> Ign:9 http://beagle.tuks.nl/debian jessie/ Sources
>> Ign:10 http://beagle.tuks.nl/debian jessie/ Packages
>> Hit:9 http://beagle.tuks.nl/debian jessie/ Sources
>> Ign:10 http://beagle.tuks.nl/debian jessie/ Packages 
>>
>> Err:9 http://beagle.tuks.nl/debian jessie/ Sources
>>   Hash Sum mismatch
>>   Hashes of expected file:
>>- Filesize:9240 [weak]
>>- 
>> SHA256:049932d406058ed828aaf162e7f2de85f12c7361cd7a4adf27f293b9eb49f539
>>- SHA1:820d8f5536c890107357d622a6b02b2389cdaf53 [weak]
>>- MD5Sum:354fc66553bfd6645c5cd31a6b7f57b4 [weak]
>>   Hashes of received file:
>>- 
>> SHA256:44853aea79e3cbc41b054c4d63b18a03cfb8636b3884edd59ac61c3d6cee8915
>>- SHA1:c1da942a286735331710b50ede75c9024a851769 [weak]
>>- MD5Sum:e6c69cba9479cdc16f83534a31384cc2 [weak]
>>- Filesize:3256 [weak]
>>   Release file created at: Thu, 09 May 2019 12:13:37 +
>> Reading package lists... Done 
>>   
>> W: GPG error: http://beagle.tuks.nl/debian jessie/ Release: The 
>> following signatures were invalid: A76E9815117798B563EC51A7FBA956CCF84E5437
>> W: The repository 'http://beagle.tuks.nl/debian jessie/ Release' is not 
>> signed.
>> N: Data from such a repository can't be authenticated and is therefore 
>> potentially dangerous to use.
>> N: See apt-secure(8) manpage for repository creation and user 
>> configuration details.
>> E: Method gave invalid 201 URI Done message
>> debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
>> libpruio-lkm libpruio-doc
>> WARNING: The following packages cannot be authenticated!
>>   libpruio-dev libpruio-doc libpruio-lkm
>> E: Some packages could not be authenticated
>> debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
>> libpruio-lkm libpruio-doc --allow-unauthenticated.
>> E: Command line option --allow-unauthenticated. is not understood in 
>> combination with the other options
>> debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
>> libpruio-lkm libpruio-doc --allow-unauthenticated
>> WARNING: The following packages cannot be authenticated!
>>   libpruio-dev libpruio-doc libpruio-lkm
>> Authentication warning overridden.
>> Get:1 http://beagle.tuks.nl/debian jessie/ libpruio-dev 0.6.6 [24.9 kB]
>> Get:2 http://beagle.tuks.nl/debian jessie/ libpruio-doc 0.6.6 [4,444 kB]
>> Get:3 http://beagle.tuks.nl/debian jessie/ libpruio-lkm 0.6.6 [9,186 B] 
>> 
>>  
>> Fetched 4,478 kB in 10s (432 kB/s)   
>> 
>> 
>> W: Download is performed unsandboxed as root as file 
>> '/var/lib/cloud9/libpruio-dev_0.6.6_armhf.deb' couldn't be accessed by user 
>> '_apt'. - pkgAcquire::Run (13: Permission denied)
>> debian@beaglebone:/var/lib/cloud9$ apt-get download libpruio-dev 
>> libpruio-lkm libpruio-doc --allow-unauthenticated   
>>  
>> WARNING: The 

[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-10 Thread Hans Leeuw
Never a dull moment. The package needs dkms and updating that package gives 
problems. installing recursively also asks for libpruio itself. I can 
probably ignore that by using --ignore-depends=libpruio?

Sorry for bothering again.

Best, Hans.


Op dinsdag 10 maart 2020 15:18:21 UTC+1 schreef Hans Leeuw:
>
> Hi Thomas,
>
> I managed, but I had to override authentication (from 
> stretch, 4.14.108-ti-r127) to be able to download. There was a bunch of 
> errors and messages on the way:
>
> debian@beaglebone:/var/lib/cloud9$ sudo apt-get update
> Ign:1 http://beagle.tuks.nl/debian jessie/ InRelease
> Get:2 http://beagle.tuks.nl/debian jessie/ Release [1,586 B] 
>
> Ign:3 http://deb.debian.org/debian stretch InRelease 
> 
> Hit:4 http://deb.debian.org/debian stretch-updates InRelease  
> Hit:5 http://deb.debian.org/debian-security stretch/updates InRelease 
> Get:6 http://beagle.tuks.nl/debian jessie/ Release.gpg [543 B]
> Hit:7 http://deb.debian.org/debian stretch Release
> Hit:8 http://repos.rcn-ee.com/debian stretch InRelease
> Ign:6 http://beagle.tuks.nl/debian jessie/ Release.gpg
> Ign:9 http://beagle.tuks.nl/debian jessie/ Sources
> Ign:10 http://beagle.tuks.nl/debian jessie/ Packages
> Hit:9 http://beagle.tuks.nl/debian jessie/ Sources
> Ign:10 http://beagle.tuks.nl/debian jessie/ Packages 
>
> Err:9 http://beagle.tuks.nl/debian jessie/ Sources
>   Hash Sum mismatch
>   Hashes of expected file:
>- Filesize:9240 [weak]
>- 
> SHA256:049932d406058ed828aaf162e7f2de85f12c7361cd7a4adf27f293b9eb49f539
>- SHA1:820d8f5536c890107357d622a6b02b2389cdaf53 [weak]
>- MD5Sum:354fc66553bfd6645c5cd31a6b7f57b4 [weak]
>   Hashes of received file:
>- 
> SHA256:44853aea79e3cbc41b054c4d63b18a03cfb8636b3884edd59ac61c3d6cee8915
>- SHA1:c1da942a286735331710b50ede75c9024a851769 [weak]
>- MD5Sum:e6c69cba9479cdc16f83534a31384cc2 [weak]
>- Filesize:3256 [weak]
>   Release file created at: Thu, 09 May 2019 12:13:37 +
> Reading package lists... Done 
>   
> W: GPG error: http://beagle.tuks.nl/debian jessie/ Release: The following 
> signatures were invalid: A76E9815117798B563EC51A7FBA956CCF84E5437
> W: The repository 'http://beagle.tuks.nl/debian jessie/ Release' is not 
> signed.
> N: Data from such a repository can't be authenticated and is therefore 
> potentially dangerous to use.
> N: See apt-secure(8) manpage for repository creation and user 
> configuration details.
> E: Method gave invalid 201 URI Done message
> debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
> libpruio-lkm libpruio-doc
> WARNING: The following packages cannot be authenticated!
>   libpruio-dev libpruio-doc libpruio-lkm
> E: Some packages could not be authenticated
> debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
> libpruio-lkm libpruio-doc --allow-unauthenticated.
> E: Command line option --allow-unauthenticated. is not understood in 
> combination with the other options
> debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
> libpruio-lkm libpruio-doc --allow-unauthenticated
> WARNING: The following packages cannot be authenticated!
>   libpruio-dev libpruio-doc libpruio-lkm
> Authentication warning overridden.
> Get:1 http://beagle.tuks.nl/debian jessie/ libpruio-dev 0.6.6 [24.9 kB]
> Get:2 http://beagle.tuks.nl/debian jessie/ libpruio-doc 0.6.6 [4,444 kB]
> Get:3 http://beagle.tuks.nl/debian jessie/ libpruio-lkm 0.6.6 [9,186 B]   
> 
>
> Fetched 4,478 kB in 10s (432 kB/s) 
> 
>   
> W: Download is performed unsandboxed as root as file 
> '/var/lib/cloud9/libpruio-dev_0.6.6_armhf.deb' couldn't be accessed by user 
> '_apt'. - pkgAcquire::Run (13: Permission denied)
> debian@beaglebone:/var/lib/cloud9$ apt-get download libpruio-dev 
> libpruio-lkm libpruio-doc --allow-unauthenticated   
>  
> WARNING: The following packages cannot be authenticated!
>   libpruio-dev libpruio-doc libpruio-lkm
> Authentication warning overridden.
>
> The packages are now downloaded... (0.6.6)
>
>
> Op dinsdag 10 maart 2020 09:03:28 UTC+1 schreef TJF:
>>
>>
>>
>> Am Dienstag, 10. März 2020 01:14:42 UTC+1 schrieb Hans Leeuw:
>>>
>>>
>>> I don't know why the pgp file is broken:-( Thanks for reporting. I 
 re-signed both. Download from the PPA should be OK now.

>>> Unfortunately the same error. Can it be buster related?
>>>
>>
>> Yes, it can. Perhaps Buster uses a version of PGP that's binary 
>> incompatible (not backward compatible). I'm no expert in such topics. And 
>> ATM no time to test Buster, sorry.
>>
>> Workaround: 

[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-10 Thread Hans Leeuw
Hi Thomas,

I managed, but I had to override authentication (from 
stretch, 4.14.108-ti-r127) to be able to download. There was a bunch of 
errors and messages on the way:

debian@beaglebone:/var/lib/cloud9$ sudo apt-get update
Ign:1 http://beagle.tuks.nl/debian jessie/ InRelease
Get:2 http://beagle.tuks.nl/debian jessie/ Release [1,586 B]   
 
Ign:3 http://deb.debian.org/debian stretch InRelease   
  
Hit:4 http://deb.debian.org/debian stretch-updates InRelease  
Hit:5 http://deb.debian.org/debian-security stretch/updates InRelease 
Get:6 http://beagle.tuks.nl/debian jessie/ Release.gpg [543 B]
Hit:7 http://deb.debian.org/debian stretch Release
Hit:8 http://repos.rcn-ee.com/debian stretch InRelease
Ign:6 http://beagle.tuks.nl/debian jessie/ Release.gpg
Ign:9 http://beagle.tuks.nl/debian jessie/ Sources
Ign:10 http://beagle.tuks.nl/debian jessie/ Packages
Hit:9 http://beagle.tuks.nl/debian jessie/ Sources
Ign:10 http://beagle.tuks.nl/debian jessie/ Packages
Err:9 http://beagle.tuks.nl/debian jessie/ Sources
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:9240 [weak]
   - SHA256:049932d406058ed828aaf162e7f2de85f12c7361cd7a4adf27f293b9eb49f539
   - SHA1:820d8f5536c890107357d622a6b02b2389cdaf53 [weak]
   - MD5Sum:354fc66553bfd6645c5cd31a6b7f57b4 [weak]
  Hashes of received file:
   - SHA256:44853aea79e3cbc41b054c4d63b18a03cfb8636b3884edd59ac61c3d6cee8915
   - SHA1:c1da942a286735331710b50ede75c9024a851769 [weak]
   - MD5Sum:e6c69cba9479cdc16f83534a31384cc2 [weak]
   - Filesize:3256 [weak]
  Release file created at: Thu, 09 May 2019 12:13:37 +
Reading package lists... Done   
W: GPG error: http://beagle.tuks.nl/debian jessie/ Release: The following 
signatures were invalid: A76E9815117798B563EC51A7FBA956CCF84E5437
W: The repository 'http://beagle.tuks.nl/debian jessie/ Release' is not 
signed.
N: Data from such a repository can't be authenticated and is therefore 
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration 
details.
E: Method gave invalid 201 URI Done message
debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
libpruio-lkm libpruio-doc
WARNING: The following packages cannot be authenticated!
  libpruio-dev libpruio-doc libpruio-lkm
E: Some packages could not be authenticated
debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
libpruio-lkm libpruio-doc --allow-unauthenticated.
E: Command line option --allow-unauthenticated. is not understood in 
combination with the other options
debian@beaglebone:/var/lib/cloud9$ sudo apt-get download libpruio-dev 
libpruio-lkm libpruio-doc --allow-unauthenticated
WARNING: The following packages cannot be authenticated!
  libpruio-dev libpruio-doc libpruio-lkm
Authentication warning overridden.
Get:1 http://beagle.tuks.nl/debian jessie/ libpruio-dev 0.6.6 [24.9 kB]
Get:2 http://beagle.tuks.nl/debian jessie/ libpruio-doc 0.6.6 [4,444 kB]
Get:3 http://beagle.tuks.nl/debian jessie/ libpruio-lkm 0.6.6 [9,186 B] 

 
Fetched 4,478 kB in 10s (432 kB/s) 

  
W: Download is performed unsandboxed as root as file 
'/var/lib/cloud9/libpruio-dev_0.6.6_armhf.deb' couldn't be accessed by user 
'_apt'. - pkgAcquire::Run (13: Permission denied)
debian@beaglebone:/var/lib/cloud9$ apt-get download libpruio-dev 
libpruio-lkm libpruio-doc --allow-unauthenticated   
 
WARNING: The following packages cannot be authenticated!
  libpruio-dev libpruio-doc libpruio-lkm
Authentication warning overridden.

The packages are now downloaded... (0.6.6)


Op dinsdag 10 maart 2020 09:03:28 UTC+1 schreef TJF:
>
>
>
> Am Dienstag, 10. März 2020 01:14:42 UTC+1 schrieb Hans Leeuw:
>>
>>
>> I don't know why the pgp file is broken:-( Thanks for reporting. I 
>>> re-signed both. Download from the PPA should be OK now.
>>>
>> Unfortunately the same error. Can it be buster related?
>>
>
> Yes, it can. Perhaps Buster uses a version of PGP that's binary 
> incompatible (not backward compatible). I'm no expert in such topics. And 
> ATM no time to test Buster, sorry.
>
> Workaround: Download the packages under Jessie/Stretch, copy them to 
> Buster, and install by
> sudo dpkg --install *.deb
> sudo apt-get -f install
>
>  
>>
>>>
>>> Find attached some files from the fast-boot system, hope that helps.
>>>
>>> $ systemd-analyze 
>>> Startup finished in 1.067s (kernel) + 15.828s (userspace) = 16.896s
>>>
>> Hoping to get there, but you have a bbb. The files are interesting 
>> though. Uenv looks the same although you have the universal cape disabled. 
>> But the status 

[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-10 Thread TJF
Am Dienstag, 10. März 2020 01:33:50 UTC+1 schrieb Hans Leeuw:
>
> And the other difference is that you seem to have disabled serial. I guess 
> that is on purpose?
>

Sure. Standard maintenence I do by WLAN. If I need a wired connection, ie. 
to configure WLAN, I use a temporary LAN connection. In your case just 
disable LAN and use USB-Serial instead.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ea83cb7f-4b49-4dfb-a692-f3a88bc7bb62%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-10 Thread TJF


Am Dienstag, 10. März 2020 01:14:42 UTC+1 schrieb Hans Leeuw:
>
>
> I don't know why the pgp file is broken:-( Thanks for reporting. I 
>> re-signed both. Download from the PPA should be OK now.
>>
> Unfortunately the same error. Can it be buster related?
>

Yes, it can. Perhaps Buster uses a version of PGP that's binary 
incompatible (not backward compatible). I'm no expert in such topics. And 
ATM no time to test Buster, sorry.

Workaround: Download the packages under Jessie/Stretch, copy them to 
Buster, and install by
sudo dpkg --install *.deb
sudo apt-get -f install

 
>
>>
>> Find attached some files from the fast-boot system, hope that helps.
>>
>> $ systemd-analyze 
>> Startup finished in 1.067s (kernel) + 15.828s (userspace) = 16.896s
>>
> Hoping to get there, but you have a bbb. The files are interesting though. 
> Uenv looks the same although you have the universal cape disabled. But the 
> status shows me you have quite a few less services. Thanks.
>

Disabling all universal capes is a major step, saving ~10s kernel time (and 
a lot of kernel memory). You don't need them. Pinmux by libpruio, and load 
necessary kernel modules manualy by modprobe.
 

>
>> My first custom app starts as a systemd service after ~7s (solar-regler). 
>> A second one wait for the network to be ready (solar-fcgi).
>>
>> Regards
>>
> Best, Hans. 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9f464c41-f099-4163-9c71-be81470487e2%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-09 Thread Hans Leeuw
And the other difference is that you seem to have disabled serial. I guess 
that is on purpose?

Best, Hans.


Op dinsdag 10 maart 2020 01:14:42 UTC+1 schreef Hans Leeuw:
>
> Hi Thomas,
>
> Between the lines...
>
> Op maandag 9 maart 2020 03:11:07 UTC+1 schreef TJF:
>>
>> Hi Hans! Don't work that late at night :-)
>>
> Look who is talking ;-) 
>
>>
>> I don't know why the pgp file is broken:-( Thanks for reporting. I 
>> re-signed both. Download from the PPA should be OK now.
>>
> Unfortunately the same error. Can it be buster related? 
>
>>
>> Find attached some files from the fast-boot system, hope that helps.
>>
>> $ systemd-analyze 
>> Startup finished in 1.067s (kernel) + 15.828s (userspace) = 16.896s
>>
> Hoping to get there, but you have a bbb. The files are interesting though. 
> Uenv looks the same although you have the universal cape disabled. But the 
> status shows me you have quite a few less services. Thanks.
>
>>
>> My first custom app starts as a systemd service after ~7s (solar-regler). 
>> A second one wait for the network to be ready (solar-fcgi).
>>
>> Regards
>>
> Best, Hans. 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5b3a6249-b498-42a8-a016-d69c8d8bca81%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-09 Thread Hans Leeuw
Hi Thomas,

Between the lines...

Op maandag 9 maart 2020 03:11:07 UTC+1 schreef TJF:
>
> Hi Hans! Don't work that late at night :-)
>
Look who is talking ;-) 

>
> I don't know why the pgp file is broken:-( Thanks for reporting. I 
> re-signed both. Download from the PPA should be OK now.
>
Unfortunately the same error. Can it be buster related? 

>
> Find attached some files from the fast-boot system, hope that helps.
>
> $ systemd-analyze 
> Startup finished in 1.067s (kernel) + 15.828s (userspace) = 16.896s
>
Hoping to get there, but you have a bbb. The files are interesting though. 
Uenv looks the same although you have the universal cape disabled. But the 
status shows me you have quite a few less services. Thanks.

>
> My first custom app starts as a systemd service after ~7s (solar-regler). 
> A second one wait for the network to be ready (solar-fcgi).
>
> Regards
>
Best, Hans. 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e79e49ab-3aae-4a8c-8b7b-e0f272e522c2%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-09 Thread Hans Leeuw
It's an application specific repo.

Best, Hans.

Op maandag 9 maart 2020 18:00:31 UTC+1 schreef Dennis Bieber:
>
> On Sun, 8 Mar 2020 18:38:33 -0700 (PDT), in 
> gmane.comp.hardware.beagleboard.user Hans Leeuw 
> > wrote: 
>
> >Hi Thomas, 
> > 
> >I have upgraded to buster (clean) and try to install libpruio as I have 
> >done before, but I got this error: 
> > 
> > 
> >debian@beaglebone:/etc/apt$ sudo apt-get update 
> >Hit:1 http://deb.debian.org/debian buster InRelease 
> >Hit:2 http://deb.debian.org/debian buster-updates InRelease 
> 
> > 
> >Hit:3 http://deb.debian.org/debian-security buster/updates InRelease 
> 
> > 
> >Ign:4 http://beagle.tuks.nl/debian jessie/ InRelease 
> 
> > 
> >Get:5 http://beagle.tuks.nl/debian jessie/ Release [1586 B] 
> 
> > 
> >Get:6 http://beagle.tuks.nl/debian jessie/ Release.gpg [566 B] 
>
> Just an observation: I'm not sure of how "clean" that upgrade is, 
> since 
> your apt repository list is full of Jessie (Debian v8) repositories, and 
> skips over Stretch (Debian v9) (which is the current "stock" OS release). 
>
>
>
> -- 
> Dennis L Bieber 
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/67b7db1c-059a-4f68-9051-a4f08296c585%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-09 Thread Dennis Lee Bieber
On Sun, 8 Mar 2020 18:38:33 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Hans Leeuw
 wrote:

>Hi Thomas,
>
>I have upgraded to buster (clean) and try to install libpruio as I have 
>done before, but I got this error:
>
>
>debian@beaglebone:/etc/apt$ sudo apt-get update
>Hit:1 http://deb.debian.org/debian buster InRelease
>Hit:2 http://deb.debian.org/debian buster-updates InRelease
> 
>Hit:3 http://deb.debian.org/debian-security buster/updates InRelease
>
>Ign:4 http://beagle.tuks.nl/debian jessie/ InRelease
>
>Get:5 http://beagle.tuks.nl/debian jessie/ Release [1586 B]
> 
>Get:6 http://beagle.tuks.nl/debian jessie/ Release.gpg [566 B]

Just an observation: I'm not sure of how "clean" that upgrade is, since
your apt repository list is full of Jessie (Debian v8) repositories, and
skips over Stretch (Debian v9) (which is the current "stock" OS release).



-- 
Dennis L Bieber

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/67tc6f9c52kcunab7evjpl7aijlph33n5e%404ax.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-08 Thread TJF
Hi Hans! Don't work that late at night :-)

I don't know why the pgp file is broken:-( Thanks for reporting. I 
re-signed both. Download from the PPA should be OK now.

Find attached some files from the fast-boot system, hope that helps.

$ systemd-analyze 
Startup finished in 1.067s (kernel) + 15.828s (userspace) = 16.896s

My first custom app starts as a systemd service after ~7s (solar-regler). A 
second one wait for the network to be ready (solar-fcgi).

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/51e7e421-2028-4f37-a6a3-07a49dba81d3%40googlegroups.com.
uname_r=4.14.146-bone29
enable_uboot_overlays=1
dtb_overlay=/lib/firmware/solar-00A0.dtbo
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_adc=1
uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
cmdline=coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet 
video=HDMI-A-1:800x480M@60e cape_universal=disable init=/lib/systemd/systemd



systemctl.status
Description: Binary data


dmesg
Description: Binary data


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-03-08 Thread Hans Leeuw
Hi Thomas,

I have upgraded to buster (clean) and try to install libpruio as I have 
done before, but I got this error:


debian@beaglebone:/etc/apt$ sudo apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian buster-updates InRelease
 
Hit:3 http://deb.debian.org/debian-security buster/updates InRelease

Ign:4 http://beagle.tuks.nl/debian jessie/ InRelease

Get:5 http://beagle.tuks.nl/debian jessie/ Release [1586 B]
 
Get:6 http://beagle.tuks.nl/debian jessie/ Release.gpg [566 B]
Hit:7 http://repos.rcn-ee.com/debian buster InRelease
Ign:6 http://beagle.tuks.nl/debian jessie/ Release.gpg
Reading package lists... Done
W: GPG error: http://beagle.tuks.nl/debian jessie/ Release: Detached 
signature file 
'/var/lib/apt/lists/partial/beagle.tuks.nl_debian_jessie_Release.gpg' is in 
unsupported binary format
E: The repository 'http://beagle.tuks.nl/debian jessie/ Release' is not 
signed.
N: Updating from such a repository can't be done securely, and is therefore 
disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration 
details.

I also had a question. In my embedded application I use libpruio, 2 I2C 
ports and 2 USB busses (a HID sensor device and USB Wifi dongle). Currently 
there is a cape with a USB-hub, but that is probably going to vanish 
because with just one device it is not really needed anymore.

I saw in the boot time discusion, that you had a very quick startup of your 
board so I wondered what you have done to accomplish that specifically in 
relation to libpruio. I have also moved to a bone kernel. I probably can't 
get to your time since I use a PocketBeagle. Currently I am at: Startup 
finished in 12.952s (kernel) + 25.336s (userspace) = 38.288s 
(4.19.94-bone44). Shaving of another 10 - 20 seconds would be nice...

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d18c8d77-be1a-47b7-a517-f6beff1f0d60%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-13 Thread Hans Leeuw
Just quick on the question of the large ringbuffer.

One of the things I want to measure is phrases on what I call digital 
valves (I am busy with a musical instrument). These digital valves are 
potmeters with a spring. I want to measure from the time that one of the 
valves gets depressed till all the valves are up again (0). I do that by 
collecting the write address at the beginning of the phrase (moment of 
first depression) and the end of the phrase (all valves up). I then analyse 
the phrase: which valves were depressed when and what was the rhythm of 
depression. I estimate the very maximum length of a phrase to be about 10 
seconds. One measurement per ms is probably a good enough resolution for 
that. On another analog input I measure the pitch and other sound 
'descriptors' from sound picked up by a microphone, hence the 22050 Hz 
sampling frequency. This only needs a buffer of 512 samples for FFT 
analysis.

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2d406a92-a206-424b-b915-271b5b0d564a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-13 Thread TJF
Hi Hans!

Am Samstag, 11. Mai 2019 02:00:32 UTC+2 schrieb Hans Leeuw: 

> I could not find the folder you mention in your post (libpruio/build). 
> What is the path toward it?
>

It's recommended that the user creates that folder inside his clone of the 
GIT repo, and builds the binaries in that subfolder = out-of-source-build 
-> no polution of the original source tree.

When you build in-source instead, you should find the file at libpruio/
install_manifest.txt
 

> It seems that the USB WiFi dongle adapter (micro male to USB A female) 
> that I use influenced the measurement. Just when I started to test my 
> theory it broke down completely, so I am not completely sure I became 
> suspicious of it when I was thinking again about the ADC not reaching its 
> conclusion and your remark about impedance. The adapter became pretty hot. 
> Much hotter then the one I currently use. So I hope that's it.
>

Seems to be OK, when you get 12 bit resolution now.

>From my point of view there's still an open question: Why do you think 
you'll need such a big ring buffer? In best case you'll need two samples: 
one set for the PRU to fetch the data, and a second for the evaluation on 
the ARM (or second PRU). OK, the ARM may be busy with other tasks, so 4 or 
8 samples may be better. Or lets say you use all memory allocated by the 
uio_pruss driver (16383 samples in your case), to be in a very save area.

But increasing the ERam size doesn't make sence. That's  only sufficient in 
MM mode, where all data must get stored in a single block.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/570a9b03-20e5-4263-ac3a-83884dc8087f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-10 Thread Hans Leeuw
Hi TJF,

Despite the fact that I think that I have found the culprit I will update 
anyway and thanks for the help. I used the method from preparation. I could 
not find the folder you mention in your post (libpruio/build). What is the 
path toward it?

It seems that the USB WiFi dongle adapter (micro male to USB A female) that 
I use influenced the measurement. Just when I started to test my theory it 
broke down completely, so I am not completely sure I became suspicious 
of it when I was thinking again about the ADC not reaching its conclusion 
and your remark about impedance. The adapter became pretty hot. Much hotter 
then the one I currently use. So I hope that's it.

Thanks for testing. That convinced me not to look for a solution in the 
software...

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/697e1a4b-6ef5-4a92-918f-f152ca8a06ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-10 Thread TJF
Hi Hans!

Am Freitag, 10. Mai 2019 14:02:46 UTC+2 schrieb Hans Leeuw:
>
> It is an idea though to upgrade. I see that 0.6.6 is the new version.
> Installation using Cmake I guess. (I honestly don't know if I used that 
> the first time).
>

Sure, there're multiple guides for the different methods at

http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/ChaPreparation.html

It sounds that you self compiled the source tree. You should have a git 
repo folder including the file libpruio/build/install_manifest.txt. In 
order to update and with internet connection, you can perform

cd libpruio/build
git pull
make
make lkm
sudo make install
sudo make lkm-install

But when you have internet connection for the Pocket, it may be more 
convenient to use the packet manager (apt), after connecting to Arends PPA. 
In that case, first you have to remove the files installed from source tree 
by executing

cd libpruio/build
make lkm-uninstall
xargs rm < install_manifest.txt

Then follow the above mentioned guide.

What makes you think that the problem could be there, since the other 
> examples work...?
>

AFAIR there has been an issue with RB mode in a very first version, 0.2 I 
guess.
 
Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7b191878-3e6f-42d3-b033-a30146990df1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-10 Thread Hans Leeuw
Hi TJF,

I think it is 0.6.4 and to be honest I don't know how I installed... There 
is no worked out install instruction is there? I installed it when the 
beagle board was stil very new to me. And although I wrote out quite a lot 
of my experiments I did not write out how I installed.
It is an idea though to upgrade. I see that 0.6.6 is the new version.
Installation using Cmake I guess. (I honestly don't know if I used that the 
first time).

What makes you think that the problem could be there, since the other 
examples work...?

Is there a way to verify the version?

Best, Hans

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/734fc378-eb79-45d6-a795-2805dbff2f57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-10 Thread TJF
Hi Hans!

Just for curiosity, which version of libpruio are you using? Where did you 
download and how did you install?

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3303f653-b4a0-4823-a5be-2e8b60289b76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-09 Thread TJF
It seems that this stupid board butchered my response. Here's the rest:

... on Beaglebone Black, AIN-[0-6] open, but AIN-7 connected on board to 1V65, 
I get

$ ./hansOK 
initialized, ESize = 4
  F50  ED5  EC6  B6A  83F  845  8EA  F24
  F4E  F13  ECD  D08  A58  941  948  F2F
  F5D  F23  EE5  DF1  BEA  A8C  A09  F28
  F56  F33  F0F  E72  CE9  BB1  AFF  F2F
  F63  F34  F1A  EB8  D9D  CA7  BEA  F25
  F52  F2F  F2D  EE0  E06  D50  CB3  F2F
  F5E  F2D  F2C  EF1  E57  DCF  D4F  F25
  F4B  F2C  F35  EFB  E75  E11  DBF  F2E
  F55  F2D  F2A  EFA  E95  E4B  E0E  F25
  F4D  F2A  F2F  F05  EA0  E68  E3D  F33
  F57  F25  F26  EFC  EAD  E8A  E6A  F28
  F47  F22  F2A  EFF  EB0  E8B  E75  F2F
  F54  F27  F24  EF8  EB3  E9D  E8B  F2A
$ sudo rmmod uio_pruss 
$ sudo modprobe uio_pruss extram_pool_sz=0x80
$ ./hansOK 
initialized, ESize = 80
  F43  ED3  EC0  B64  842  839  8D3  F2F
  F50  F03  EC9  D11  A62  941  930  F2A
  F57  F2B  EE6  DEC  BDE  A8B  A07  F32
  F58  F22  F01  E71  CEF  BB5  AF6  F28
  F5A  F31  F1B  EB2  D95  CA7  BEF  F31
  F58  F28  F23  EDF  E11  D52  CAE  F25
  F51  F2F  F32  EED  E47  DC6  D51  F32
  F54  F2A  F30  EFB  E7B  E15  DB6  F2B
  F4F  F2D  F30  EFC  E89  E4A  E10  F35
  F56  F21  F26  EFF  EA9  E71  E3E  F24
  F4B  F28  F2B  F00  EAC  E82  E67  F37
  F52  F20  F25  EFD  EBA  E94  E74  F2A
  F49  F2A  F2A  EF7  EAE  E98  E89  F33

So here it works with standard (16384 samples) or maximum ERam (220500 
samples) configuration on kernel

4.14.69-ti-r76

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d4b3f47c-3037-4fbc-b71a-f73444cacdad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-09 Thread TJF
Hi Hans!

Am Mittwoch, 8. Mai 2019 22:26:04 UTC+2 schrieb Hans Leeuw:
>
> Oh, and the loop goes on. The problem is not there.
>

Yes, there's a break; statement missing at the end of the while loop.

Sorry, I cannot reproduce the problem. Using this code

// gcc -Wall -o hansOK hansOK.c -lpruio
#include "stdio.h"
#include "libpruio/pruio.h" // include header
#include 

int main(int argc, char **argv)
{
  int i = 1, n;
  char *emsg = "CTOR";
  pruIo *io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0);
  while (!io->Errr) {
if (pruio_adc_setStep(io,  7, 0, 1, 0, 0)) {emsg = "AIN-0"; i = 2; break
;} //Step  7, AIN-0
if (pruio_adc_setStep(io,  8, 1, 1, 0, 0)) {emsg = "AIN-1"; i = 2; break
;} //Step  8, AIN-1
if (pruio_adc_setStep(io,  9, 2, 1, 0, 0)) {emsg = "AIN-2"; i = 2; break
;} //Step  9, AIN-2
if (pruio_adc_setStep(io, 10, 3, 1, 0, 0)) {emsg = "AIN-3"; i = 2; break
;} //Step 10, AIN-3
if (pruio_adc_setStep(io, 11, 4, 1, 0, 0)) {emsg = "AIN-4"; i = 2; break
;} //Step 11, AIN-4
if (pruio_adc_setStep(io, 12, 5, 1, 0, 0)) {emsg = "AIN-5"; i = 2; break
;} //Step 12, AIN-5
if (pruio_adc_setStep(io, 13, 6, 1, 0, 0)) {emsg = "AIN-6"; i = 2; break
;} //Step 13, AIN-6
if (pruio_adc_setStep(io, 14, 7, 1, 0, 0)) {emsg = "AIN-7"; i = 2; break
;} //Step 14, AIN-7

// upload settings, prepare MM mode
if (pruio_config(io, 220500, 255<<7, 45352, 0)) {emsg = "config";   i = 
3; break;}
//if (pruio_config(io, 16384, 255<<7, 45352, 0)) {emsg = "config";   i 
= 3; break;}
// start measurement   //Starts in rb_mode
if (pruio_rb_start(io)){emsg = "rb_start"; i = 4
; break;}
printf("initialized, ESize = %X\n", io->ESize);
usleep(1);
  /* now current ADC samples are available for AIN-0 to AIN-7 in array 
io->Adc->Value[] */
for(n = 0; n <= 12; n++) { //   print some lines
  for(i = 0; i < 8; i++) //all steps
printf(" %4X", io->Adc->Value[i + (8 * n)]); //  output one channel 
in hex
  printf("\n"); // next line
  }
i = 0; break;
  }
/* we're done */
  if (io->Errr) printf("%s failed (%s)\n", emsg, io->Errr);

  pruio_destroy(io);/* destroy driver structure */
  return i;
}

on Beaglebone Black, AIN-[0-6] open, but AIN-7 connected on board to 1V65, 
I get

$ ./hansOK 
initialized, ESize = 4
  F50  ED5  EC6  B6A  83F  845  8EA  F24
  F4E  F13  ECD  D08  A58  941  948  F2F
  F5D  F23  EE5  DF1  BEA  A8C  A09  F28
  F56  F33  F0F  E72  CE9  BB1  AFF  F2F
  F63  F34  F1A  EB8  D9D  CA7  BEA  F25
  F52  F2F  F2D  EE0  E06  D50  CB3  F2F
  F5E  F2D  F2C  EF1  E57  DCF  D4F  F25
  F4B  F2C  F35  EFB  E75  E11  DBF  F2E
  F55  F2D  F2A  EFA  E95  E4B  E0E  F25
  F4D  F2A  F2F  F05  EA0  E68  E3D  F33
  F57  F25  F26  EFC  EAD  E8A  E6A  F28
  F47  F22  F2A  EFF  EB0  E8B  E75  F2F
  F54  F27  F24  EF8  EB3  E9D  E8B  F2A
$ sudo rmmod uio_pruss 
$ sudo modprobe uio_pruss extram_pool_sz=0x80
$ ./hansOK 
initialized, ESize = 80
  F43  ED3  EC0  B64  842  839  8D3  F2F
  F50  F03  EC9  D11  A62  941  930  F2A
  F57  F2B  EE6  DEC  BDE  A8B  A07  F32
  F58  F22  F01  E71  CEF  BB5  AF6  F28
  F5A  F31  F1B  EB2  D95  CA7  BEF  F31
  F58  F28  F23  EDF  E11  D52  CAE  F25
  F51  F2F  F32  EED  E47  DC6  D51  F32
  F54  F2A  F30  EFB  E7B  E15  DB6  F2B
  F4F  F2D  F30  EFC  E89  E4A  E10  F35
  F56  F21  F26  EFF  EA9  E71  E3E  F24
  F4B  F28  F2B  F00  EAC  E82  E67  F37
  F52  F20  F25  EFD  EBA  E94  E74  F2A
  F49  F2A  F2A  EF7  EAE  E98  E89  F33

So here it works with standard (16384 samples) or maximum ERam (220500 
samples) configuration on kernel

4.14.69-ti-r76

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/235b92d2-f2ac-4b46-9697-377df4f445f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-08 Thread Hans Leeuw
For what it is worth, I also tried to do it in freebasic. I don't know 
anything about freebasic but tried to hack something together and I see 
exactly the same behaviour:

' include libpruio
#INCLUDE ONCE "BBB/pruio.bi"

CONST tSamp = 2 _  '*< The number of samples in the files (per step).
  , tmr = 45352 _   '*< The sampling rate in ns (2 -> 50 kHz).
   , NoStep = 8 _   '*< The number of active steps (must match setStep 
calls and mask).

VAR io = NEW PruIo()'*< Create a PruIo structure, wakeup subsystems.

WITH *io
  DO
IF .Errr THEN ?"NEW failed: " & *.Errr : EXIT DO

IF .Adc->setStep( 7, 0, 0, 0, 0) THEN _
 ?"step 9 configuration failed: " & *.Errr : EXIT DO
IF .Adc->setStep( 8, 1, 0, 0, 0) THEN _
?"step 10 configuration failed: " & *.Errr : EXIT DO
IF .Adc->setStep( 9, 2, 0, 0, 0) THEN _
?"step 11 configuration failed: " & *.Errr : EXIT DO
IF .Adc->setStep(10, 3, 0, 0, 0) THEN _
 ?"step 9 configuration failed: " & *.Errr : EXIT DO
IF .Adc->setStep(11, 4, 0, 0, 0) THEN _
?"step 10 configuration failed: " & *.Errr : EXIT DO
IF .Adc->setStep(12, 5, 0, 0, 0) THEN _
?"step 11 configuration failed: " & *.Errr : EXIT DO
IF .Adc->setStep(13, 6, 0, 0, 0) THEN _
 ?"step 9 configuration failed: " & *.Errr : EXIT DO
IF .Adc->setStep(14, 7, 0, 0, 0) THEN _
?"step 10 configuration failed: " & *.Errr : EXIT DO

VAR mask =  SHL 7 _ '*< The active steps (7 to 14).

IF .config(tSamp, mask, tmr, 0) THEN _ ' configure driver
   ?"config failed: " & *.Errr : EXIT DO

IF .rb_start() THEN _ '   start ring buffer mode
 ?"rb_start failed: " & *.Errr : EXIT DO

sleep 10

' here current ADC samples are available in array Adc->Value[]
  FOR n AS LONG = 0 TO 13 ' print some lines
FOR i AS LONG = 0 TO 7 '   all steps
  PRINT " " & HEX(io->Adc->Value[i + 8 * n], 0); ' output one channel 
in hex
NEXT
PRINT 'next line
  NEXT
 
  LOOP UNTIL 1
  IF .Errr THEN SLEEP
END WITH

DELETE(io)


Output:

 C2D D7 747 F 117 F9F 4F 197
 927 BF 4BB F 117 F9F 4F 197
 757 A7 377 13 11F F9F 53 197
 62F 9B 2EF 17 123 F9F 57 19F
 56F 8F 2BF 17 127 F9F 57 19F
 4EF 8F 2AF 17 127 F9F 57 19F
 4AF 87 29F 17 12F F9F 57 19F
 47F 7F 29F 17 12F F9F 57 19F
 45F 7F 29F 17 12F FAF 57 19F
 457 7F 29F 17 12F FAF 57 19F
 44F 7F 29F 1B 12F FAF 57 19F
 44F 7F 29F 1F 12F F9F 57 19F
 43F 7F 29F 1F 12F FAF 5F 19F

Should I ask if this is pocket beagle related in a general forum or support 
or does exactly the same happen on the BBB with ringbuffer mode? And is 
this related to the processor or could there be a bug in libpruio?

Thanks for thinking with me.

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a98fe5ef-a025-441b-8e72-e9e150c07eaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-08 Thread Hans Leeuw
Hi TJF,

No errors. Warnings when compiling with g++ all similar to each other:* 
testRB.c:28:61: warning: ISO C++ forbids converting a string constant to 
‘char*’ [-Wwrite-strings]*
* if (pruio_rb_start(io)) {emsg = "rb_start"; i 
= 4; break;*
no warnings, nor errors when compiling with gcc.

io Esize = 8388608

But the output still has the same problem. About 9 bits get converted but 
the least significant last three bits stay at 111(7).

Oh, and the loop goes on. The problem is not there.
Sampling 100 times slower, delay to the maximum and short buffer:

  pruIo *io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0);

  while (!io->Errr) {
if (pruio_adc_setStep(io,  7, 0, 1, 255, 0)) {emsg = "step  7"; i = 2; 
break;} //Step  7, AIN-0
if (pruio_adc_setStep(io,  8, 1, 1, 255, 0)) {emsg = "step  8"; i = 2; 
break;} //Step  8, AIN-1
if (pruio_adc_setStep(io,  9, 2, 1, 255, 0)) {emsg = "step  9"; i = 2; 
break;} //Step  9, AIN-2
if (pruio_adc_setStep(io, 10, 3, 1, 255, 0)) {emsg = "step 10"; i = 2; 
break;} //Step 10, AIN-3
if (pruio_adc_setStep(io, 11, 4, 1, 255, 0)) {emsg = "step 11"; i = 2; 
break;} //Step 11, AIN-4
if (pruio_adc_setStep(io, 12, 5, 1, 255, 0)) {emsg = "step 12"; i = 2; 
break;} //Step 12, AIN-5
if (pruio_adc_setStep(io, 13, 6, 1, 255, 0)) {emsg = "step 13"; i = 2; 
break;} //Step 13, AIN-6
if (pruio_adc_setStep(io, 14, 7, 1, 255, 0)) {emsg = "step 14"; i = 2; 
break;} //Step 14, AIN-7

// upload settings, prepare MM mode
if (pruio_config(io, 2205, 255<<7, 4535200, 0)) {emsg = "config";   i = 
3; break;}



No difference either.

initialized, io size = 8388608

  F88   F3  8CF7   F3   231   67
  ABF   CF  5ABF   7F   273   6F
  7FF   AF  3FF   17   63   2F7   77
  64F   9F  35F   17   5F   2FB   77
  537   8F  317   17   5F   2FF   7F
  48F   7F  2FF   1F   67   37F   7F
  427   7F  2F7   1F   67   37F   7F
  3EF   7F  2EF   1F   67   37   17   7F
  3CF   7F  2EF   1F   67   37F   7F
  3BF   7F  2EF   1F   67   37   17   7F
  3BF   7F  2F7   1F   67   37   17   7F
  3B7   7F  2EF   1F   67   37   17   7F
  3AF   7F  2EF   1F   67   37   17   7F
  3AF   7F  2EF   1F   67   37   17   7F

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/fbfc6ac9-ece7-41c9-b804-63996a98ab39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-08 Thread TJF
Hi Hans!

Am Mittwoch, 8. Mai 2019 18:54:37 UTC+2 schrieb Hans Leeuw:
>
> I set it at the maximum size for the moment although it can be a little 
> smaller indeed I forgot to make it smaller in my example. I think it is 
> not important for the resolution issue though.
>

When the size of the ERam is too small the main loop doesn't start -> no 
ADC sampling at all. You'll get garbage.
 

> Starting the outer loop at 0 wil only lead to printing the step cycle one 
> compleet cycle earlier (from the start) but does not change the resolution 
> either.
>

Correct!

Where do I fail to catch an error message?
>

A lot of errors are uncatched. This version catches them all

#include "stdio.h"
#include "libpruio/pruio.h" // include header
#include 

int main(int argc, char **argv)
{
  int i = 1, n;
  char *emsg = "CTOR";
  pruIo *io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0);
  while (!io->Errr) {
if (pruio_adc_setStep(io,  7, 0, 1, 0, 0)) {emsg = "step  7"; i = 2; 
break;} //Step  7, AIN-0
if (pruio_adc_setStep(io,  8, 1, 1, 0, 0)) {emsg = "step  8"; i = 2; 
break;} //Step  8, AIN-1
if (pruio_adc_setStep(io,  9, 2, 1, 0, 0)) {emsg = "step  9"; i = 2; 
break;} //Step  9, AIN-2
if (pruio_adc_setStep(io, 10, 3, 1, 0, 0)) {emsg = "step 10"; i = 2; 
break;} //Step 10, AIN-3
if (pruio_adc_setStep(io, 11, 4, 1, 0, 0)) {emsg = "step 11"; i = 2; 
break;} //Step 11, AIN-4
if (pruio_adc_setStep(io, 12, 5, 1, 0, 0)) {emsg = "step 12"; i = 2; 
break;} //Step 12, AIN-5
if (pruio_adc_setStep(io, 13, 6, 1, 0, 0)) {emsg = "step 13"; i = 2; 
break;} //Step 13, AIN-6
if (pruio_adc_setStep(io, 14, 7, 1, 0, 0)) {emsg = "step 14"; i = 2; 
break;} //Step 14, AIN-7

// upload settings, prepare MM mode
if (pruio_config(io, 220500, 255<<7, 45352, 0)) {emsg = "config";   i = 
3; break;}
// start measurement   //Starts in rb_mode
if (pruio_rb_start(io)) {emsg = "rb_start"; i = 
4; break;}
printf("initialized\n");
usleep(1);
  /* now current ADC samples are available for AIN-0 to AIN-7 in array 
io->Adc->Value[] */
for(n = 0; n <= 13; n++) { //   print some lines
  for(i = 0; i < 8; i++) //all steps
printf(" %4X", io->Adc->Value[i + (8 * n)]); //  output one channel 
in hex
  printf("\n"); // next line
  }
i = 0;
  }
/* we're done */
  if (io->Errr) printf("%s failed (%s)\n", emsg, io->Errr);

  pruio_destroy(io);/* destroy driver structure */
  return i;
}

Try it. You also can check the available ERam size by printing out io->ESize
.

 

> The documentation also mentions a status bit that is used to indicate that 
> the ADC is busy converting (page 1828). Is the status bit information used 
> in the rb-mode?
>

Yes, the status bit gets checked for restart as well as the FiFo counter 
before fetching a sample.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/607744f4-6055-44f7-9439-e88b32feb95f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-08 Thread Hans Leeuw
Hi TJF,

I increase the external RAM at startup:

https://groups.google.com/forum/#!msg/beagleboard/_8Ld1deXhSY/gAoPN2FaDwAJ 
(Brian B's post)

I set it at the maximum size for the moment although it can be a little 
smaller indeed I forgot to make it smaller in my example. I think it is 
not important for the resolution issue though.

Starting the outer loop at 0 wil only lead to printing the step cycle one 
compleet cycle earlier (from the start) but does not change the resolution 
either.

Where do I fail to catch an error message?

So any clue on the resolution issue except for impedance? Why does it only 
play up in rb-mode and not in single shot? Did you try the rb-mode example? 
I tried to use delays in setstep but at high speed you cannot use too much. 
It seems that delays help the issue a little but it is not useable in 
practice. It is also unclear what unit is used for sample delay. Are those 
ADC clock pulses? Then I would expect 4 clock pulses to be enough to do 4 
extra ADC steps...

The documentation also mentions a status bit that is used to indicate that 
the ADC is busy converting (page 1828). Is the status bit information used 
in the rb-mode?
I did not try yet whether the freebasic example yields the same result. 
Would you recommend checking it?

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/03ccd569-9d08-484e-8519-9f8f2991fe4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-08 Thread TJF
Hi Hans!

What did you do in order to increase the external RAM size for the 
uio_pruss driver?

With standard configuration (io->ESize = 262144) your code generates an 
error message

config failed (out of memory)

at line

if (pruio_config(io, 220500, 255<<7 , 45352, 0))

, but it doesn't stop in that case. It tries to continue, and fails.

Either increase the extram_pool_sz parameter for the uio_pruss driver, or 
reduce the number of samples (<= 16384 == 262144 / 2 / 8) for standard 
setting.

Tipps:

   - Always end the code in case of an error message.
   - The outer output loop should start at 0 (zero): 
   
   for(n = 0; n <= 12; n++) {
   
   
Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/23eabe26-98d7-48f3-9006-abbc3d6954ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-07 Thread Hans Leeuw

>
> Hi TJF,
>

It is not the impedance I think, but it was interesting to go back to the 
normal io example 1.c. The behaviour is different. Output when using that 
example (but without leftshift):

00000000
  C37   13  9B75  199  E340  1A4
  C3B   13  9B75  199  E360  1A5
  C37   12  9BD5  197  E360  1A4
  C37   11  9B85  199  E340  1A5
  C38   13  9B75  199  E360  1A5
  C37   13  9BA4  197  E350  1A5
  C37   12  9BA4  197  E350  1A5
  C37   12  9B74  197  E350  1A5
  C37   12  9B75  197  E350  1A5
  C37   12  9B75  197  E350  1A5
  C37   12  9B75  197  E350  1A5
  C37   12  9B75  197  E350  1A5 

So that is ok!!!
But now, when adapting the syntax and using ringbuffer mode (and I hope I 
did the syntax ok):

#include "stdio.h"
#include "libpruio/pruio.h" // include header
#include 

int main(int argc, char **argv)
{
int i, n;
pruIo *io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0);

  pruio_adc_setStep(io, 7, 0, 1, 0, 0);//Step 1, AIN-0
  pruio_adc_setStep(io, 8, 1, 1, 0, 0);   //Step 2, AIN-1
  pruio_adc_setStep(io, 9, 2, 1, 0, 0);   //Step 3, AIN-2
  pruio_adc_setStep(io, 10, 3, 1, 0, 0);//Step 4, AIN-3
  pruio_adc_setStep(io, 11, 4, 1, 0, 0);   //Step 5, AIN-4
  pruio_adc_setStep(io, 12, 5, 1, 0, 0);//Step 6, AIN-5
  pruio_adc_setStep(io, 13, 6, 1, 0, 0);   //Step 7, AIN-6
  pruio_adc_setStep(io, 14, 7, 1, 0, 0);   //Step 8, AIN-7
  
if (pruio_config(io, 220500, 255<<7 , 45352, 0)){ // upload (default) 
settings, start IO mode
   printf("config failed (%s)\n", io->Errr);}  
if (pruio_rb_start(io)) printf("rb_start failed (%s)\n", io->Errr); // 
start measurement   //Starts in rb_mode
printf("initialized\n");
usleep(1);
/* now current ADC samples are available for AIN-0 to AIN-7 in array 
io->Adc->Value[] */
for(n = 1; n <= 13; n++) { //   print some lines
for(i = 0; i < 8; i++) //all steps
 printf(" %4X", io->Adc->Value[i + (8 * n)]); //  output one 
channel in hex
printf("\n"); // next line
}
/* we're done */
   pruio_destroy(io);/* destroy driver structure */
   return 0;
}

output:

  8EF   B7  477F  10F  E3F   47  19F
  72F   A7  357F  117  E3F   4F  1A3
  60F   97  2DF   13  11B  E3F   4F  1A3
  557   8F  2B7   17  11F  E3F   4F  1A7
  4DF   8F  2A7   17  11F  E3F   4F  1A7
  49F   7F  29F   17  127  E3F   4F  1A7
  477   7F  29F   17  127  E3F   4F  1A7
  45F   7F  29F   17  127  E4F   53  1A7
  44F   7F  29F   17  127  E3F   4F  1A7
  447   7F  29F   17  127  E3F   4F  1A7
  43F   7F  29F   17  127  E3F   53  1A7
  43F   7F  29F   1B  127  E3F   53  1A7
  43F   7F  29F   17  127  E3F   53  1A7

There are definitely some interesting differences in the output. Loose from 
the  difference in resolution some of the inputs (Ain-0, Ain-1, Ain-2, 
Ain-6) cause very different output from the values that come from the 
minimal code ADC example while Ain-3, Ain-4, Ain-5, Ain-7 are more or less 
the same except for the resolution thing. (Pull-down activated in the 
minimal example?). The battery is connected to Ain-5 in both situations 
using a 10kΩ potmeter on that channel, the other channels are floating so 
maybe we should not pay too much attention to the absolute differences but 
we do see that the resolution thing seems connected to rb-mode unless my 
syntax is false.

Looking for a clue...

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/f70258ef-5c00-483d-ac8a-a4438b78ea0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-04 Thread TJF
Hi Hans!

Your configuration code seems to be OK.

Regarding your guess:
libpruio picks up the samples from a FiFo buffer. It's unlikely that the 
TSC_ADC_SS sends a value to the FiFo before the sampling process is 
finished (unless you butchered your hardware). It's more likely that you 
have high impedance signals, which break down when sampling comes to the 
lower bits (and current increases).

Anyway, you can perform an easy resolution test: connect one input to a 
strong signal, ie. from a simple 1V5 battery cell. Then run the example 1.c 
and check the resolution of the battery channel. It should flicker at the 
last one or two bits.

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/8d6c2139-2309-46b8-b03a-51965b5d6e7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-03 Thread hans
Hi TJF!

Again, since I forgot a line of code and I think this post is more clear:

I read your suggestion and spend some time reading but I cannot really 
figure out what I could do to remedy the issue. The bit shifting does not 
change anything either but it gave insight.
I do have an inkling about what happens now. My strong suspicion is that 
the ADC conversion process does not finish.
With 12 bits we would start the ADC sample process with 0111 and 
look if the corresponding voltage is lower or higher then our input. If our 
input voltage is higher the next probe would be 10111, if that is 
lower we probe 1001. When I measure 0V I often get values like 15 
with some 23 mixed within. There are also some values of 19 but much less 
then we see the value 23 which is odd since we would expect something like 
a normal distribution. This suggests that the process mostly stops before 
the last three bits are processed by the ADC.

My configuration of the pruio is below:

pruIo *io = pruio_new(PRUIO_DEF_ACTIVE, 1, 0x98, 0);   //Create a new 
driver structure

void ADC::initPruio() {
  pruio_adc_setStep(io, 7, 0, 1, 0, 0);//Step 1, AIN-0
  pruio_adc_setStep(io, 8, 1, 1, 0, 0);   //Step 2, AIN-1
  pruio_adc_setStep(io, 9, 2, 1, 0, 0);   //Step 3, AIN-2
  pruio_adc_setStep(io, 10, 3, 1, 0, 0);//Step 4, AIN-3
  pruio_adc_setStep(io, 11, 4, 1, 0, 0);   //Step 5, AIN-4
  pruio_adc_setStep(io, 12, 5, 1, 0, 0);//Step 6, AIN-5
  pruio_adc_setStep(io, 13, 6, 1, 0, 0);   //Step 7, AIN-6
  pruio_adc_setStep(io, 14, 7, 1, 0, 0);   //Step 8, AIN-7

  if (pruio_config(io, SAMPLE_RATE, 255<<7 , 45352, 0)){// upload 
settings: 220500 (* 8) samples (, 255 is bin , 22.05 kHz, 16 bits,
  printf("config failed (%s)\n", io->Errr);}
  if (pruio_rb_start(io)) printf("rb_start failed (%s)\n", io->Errr); // 
start measurement   //Starts in rb_mode
  printf("initialized\n");
}

I hope you can help me to point me in the right direction.

Best, Hans.




-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e65cbd4e-1bf2-4187-a997-c127b7df05e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-03 Thread hans
Hi TMF!

The left shift was not the problem although it helps removing it for 
clarity. I have read some in chapter 12 of the AM335x documentation but I 
am afraid I still do not totally understand.

What I can see is that it seems that the ADC process does not get finished. 
At least that is my guess. I always end up with a situation where either 
the last 2, 3 or even 4 bits stay high. That looks like an unfinished ADC 
process where you would start with 0111 and its corresponding 
reference voltage then if the voltage is higher this gets changed to 
1011, if the voltage is now lower then we get 1001 end so 
on. When measuring 0V I always end up with 7 as the lowest value or 15 and 
then 23, 31 etcetera. Or sometimes some 19 in between but often not. As if 
the procedure does not get to the last 2, 3 or even 4 bits.

I tried to fiddle around with the sample and open delay settings but that 
seems to have no effect other then getting error messages telling me that I 
use too high sample rates (that message appears already when I use low 
numbers but it can handle 1). As stated earlier when I lower my sample rate 
with a factor 10, if that was the problem, I would expect the problem to 
vanish, but it does not. Further I set averaging to 1. And finishing, It 
does not make any difference starting from step 1 or from step 7 (as is 
done in the initialisation code that I provide here):

void ADC::initPruio() {
  pruio_adc_setStep(io, 7, 0, 1, 0, 0);//Step 7, AIN-0
  pruio_adc_setStep(io, 8, 1, 1, 0, 0);   //Step 8, AIN-1
  pruio_adc_setStep(io, 9, 2, 1, 0, 0);   //Step 9, AIN-2
  pruio_adc_setStep(io, 10, 3, 1, 0, 0);//Step 10, AIN-3
  pruio_adc_setStep(io, 11, 4, 1, 0, 0);   //Step 11, AIN-4
  pruio_adc_setStep(io, 12, 5, 1, 0, 0);//Step 12, AIN-5
  pruio_adc_setStep(io, 13, 6, 1, 0, 0);   //Step 13, AIN-6
  pruio_adc_setStep(io, 14, 7, 1, 0, 0);   //Step 14, AIN-7

  if (pruio_config(io, 220500, 255<<7 , 45352, 0)){// upload settings: 
220500 (* 8) samples (, 255 is bin , 22.05 kHz, 12 bits,
  printf("config failed (%s)\n", io->Errr);}
  if (pruio_rb_start(io)) printf("rb_start failed (%s)\n", io->Errr); // 
start measurement   //Starts in rb_mode
  printf("initialized\n");
}

I hope you can point me in a more concrete direction.

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/b2b6d660-1c85-4460-92b1-c3e41b94fdd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-03 Thread TJF
Hi Hans!

First let me say that I have no Pocket and cannot speak about experience, 
but only about knowledge that I've read anywhere.

As far as I know the PocketBeagle has a CPU with inbuild memory, but fully 
compatible to the AM3358 (which I use). My guess is that the ADC measurent 
is equal at both systems (untested), which gets done by the TSC_ADC_SS (= 
Touch Screen Controller_Analoge Digital Converter_Sub System). That 
subsystem is designed to measure touch screen input, and the measurent 
isn't very accurate.

Anyway, you should see 12 bit resolution. But note, libpruio may left shift 
the raw data in order to make them comparable with 16 bit measurements. 
This depends on the last parameter Mds in the call to function 
PruIo::config() 
.
 
When this parameter is 0 (zero) you'll get unchanged data directly from the 
TSC_ADC_SS. This should be in the range of 0-4095 with one bit resolution. 
Find further details in the libpruio docs 

 
and in the CPU TRM chapter 12 .

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/79987215-2a20-478f-ac3e-266a027c6c13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-03 Thread TJF
 Hi Hans!

First let me say that I have no Pocket and cannot speak about experience, 
but only about knowledge that I've read anywhere.

As far as I know the PocketBeagle has a CPU with inbuild memory, but fully 
compatible to the AM3358 (which I use). My guess is that the ADC measurent 
is equal at both systems (untested), which gets done by the TSC_ADC_SS (= 
Touch Screen Controller_Analoge Digital Converter_Sub System). That 
subsystem is designed to measure touch screen input, and the measurent 
isn't very accurate.

Anyway, you should see 12 bit resolution. But note, libpruio may left shift 
the raw data in order to make them comparable with 16 measurements. This 
depends on the last parameter Mds in the call to function PruIo::config() 
.
 
When this parameter is 0 (zero) you'll get unchanged data directly from the 
TSC_ADC_SS. This should be in the range of 0-4095 with one bit resolution. 
Find further details in the libpruio docs 

 
and in the CPU TRM chapter 12 .

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/53f6055d-4944-470a-b16b-7d1f906481ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-03 Thread TJF
Hi Hans!

First let me say that I have no Pocket and cannot speak about experience, 
but only about knowledge that I've read anywhere.

As far as I know the PocketBeagle has a CPU with inbuild memory, but fully 
compatible to the AM3358 (which I use). My guess is that the ADC measurent 
is equal at both systems (untested), which gets done by the TSC_ADC_SS (= 
Touch Screen Controller_Analoge Digital Controller_Sub System). That 
subsystem is designed to measure touch screen input, and the measurent 
isn't very accurate.

Anyway, you should see 12 bit resolution. But note, libpruio may left shift 
the raw data in order to make them comparable with 16 measurements. This 
depends on the last parameter Mds in the call to function PruIo::config(). 
When this parameter is 0 (zero) you'll get unchanged data directly from the 
TSC_ADC_SS. This should be in the range of 0-4095 with one bit resolution. 
Find further details in the libpruio docs 

 
and in the CPU TRM chapter 12 .

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/99054f06-c72a-480e-b5a3-a02d8935f326%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-05-02 Thread hans
Hi TJF,

I am getting the hang of the pocket beagle, C++ and libpruio and I am 
testing some features. Thanks again for your efforts because it has been 
really helpful. One of the things that struck me as odd is that the claim 
of the beaglebone is 12-bit ADC's. What I see when I measure the analoge 
pins is values that differ by 64. This suggests that the pocket beagle is 
not 12 bit but 10 bit... (full range is 65536 and differences between 
values are 64 is 1024 steps or 10 bits). I must say that the difference is 
not 64 consequently but sometimes the differences are 32 bit (other 
measurement). So it seems the board shifts between bit depths. I tried with 
sample frequencies 22.1kHz and 1kHz. 1 khz seems inclined to 11 bit.

My question is whether you know if this is because of libpruio or a general 
issue with the pocket beagle and whether there is a way to fixate the bit 
depth at 12 also for high frequencies?

I measure 8 channels and the number of samples is 220500 (10 seconds of 
audio at 22.1 kHz).

Thanks in advance.

Best, Hans.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6d8aa386-6fa4-4158-b688-d35db92bb973%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-04-06 Thread TJF
Hi CM!

Am Montag, 1. April 2019 19:39:48 UTC+2 schrieb CM:
>
> TJF,
>
> Thank you for your help, especially because it turned out to be more of a 
> systemd issue than libpruio! I have now changed my service so that it 
> doesn't start until later in the boot process, and everything seems to be 
> functioning correctly.
>

You're welcome! At the end it was both, a systemd and a libpruio issue. A 
race condition between kernel driver loading and constructor call with 
admin privileges. Because it's a common use case, I made an entry in the Tips 
and Tricks 

 
section.

Thanks for your feedback!

Regards 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/f7b2a24b-157e-4ec8-ac02-4b3af81dfa81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-04-01 Thread CM
TJF,

Thank you for your help, especially because it turned out to be more of a 
systemd issue than libpruio! I have now changed my service so that it 
doesn't start until later in the boot process, and everything seems to be 
functioning correctly.

My initial mistake was making multiple changes at the same time: the number 
of samples in my libpruio program and editing my systemd services. Because 
of that, I was looking at the wrong potential cause of the problem.

Thanks, again.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ccbc7427-5386-445c-bfde-950c10a43baa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-30 Thread TJF
Am Freitag, 29. März 2019 21:18:58 UTC+1 schrieb CM:
>
> Your suggested steps did work to connect uio5, thanks! It reverts to the 
> disconnected state on reboot, however.
>

Good! 

>
> I do have several services running, including for the IMU and the analog 
> in (using libpruio). So my service isn't explicitly changing uio5, but 
> maybe it invokes it too early in the boot process.
>

Sure, your service must not start before the driver is loaded. Here is an 
example how I start one of my projects

File /etc/systemd/system/solar.service
[Unit]
Description=Start controller (/etc/default/solar-regler.sh)

[Service]
Type=oneshot
ExecStart=/etc/default/solar-regler.sh
StandardOutput=tty
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

File /etc/default/solar-regler.sh (the program to start is called 
solar-regler)
#!/bin/sh -e
# load PRU kernel driver and start contoller (Jessie)

uio=/dev/uio5

# wait until kernel driver created the socket nodes
until test -e ${uio}; do sleep 1; done

# start controller
/usr/local/bin/solar-regler &

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/1763291d-3475-4741-9fb0-cfb4ef1dd270%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread CM
Hello,

Your suggested steps did work to connect uio5, thanks! It reverts to the 
disconnected state on reboot, however.

I do have several services running, including for the IMU and the analog in 
(using libpruio). So my service isn't explicitly changing uio5, but maybe 
it invokes it too early in the boot process.

When I disable the service that uses libpruio, I am able to manually run my 
code, and the example code (e.g 1, io_input).

Thank you for your help. I just have to figure out what about my service is 
causing this issue.


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6c21eb95-0ad7-4d7a-a157-153e0c5ae5e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread TJF
I don't understand why uio5 doesn't change. The main issue is it's lenght 
of 0 bytes (others are 240). The device seems to be disconnected from the 
driver, and the driver loader cannot change the file.

Sorry, you don't have a libpruio issue. You have a problem with LINUX 
driver loading. And I have no Blue to test here, so I cannot really help.

I'd try to erase the file before reloading the driver

lsmod | grep uio*
sudo rmmod uio_pruss
lsmod | grep uio*
ls -l /dev/uio*
sudo rm -f /dev/uio5
ls -l /dev/uio*
sudo modprobe uio_pruss
lsmod | grep uio*
ls -l /dev/uio*

Regards

PS: Check your systemd services if anyone is changing the file /dev/uio5.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/1004761c-eb0b-46e2-a752-9b65e6b029db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread CM
Yes, I think I should probably take a deep breath, thanks!

So my system image was initially written in November, I guess, which is why 
that date is shown. It updates after being on a bit (via GPS).
Now it shows *all* /dev/uio* as Nov 3, until removing/reinstalling 
uio_pruss. Please see the output below:

debian@beaglebone:~$ ls -l /dev/uio*
crw-rw 1 root users 240, 0 Nov  3  2016 /dev/uio0
crw-rw 1 root users 240, 1 Nov  3  2016 /dev/uio1
crw-rw 1 root users 240, 2 Nov  3  2016 /dev/uio2
crw-rw 1 root users 240, 3 Nov  3  2016 /dev/uio3
crw-rw 1 root users 240, 4 Nov  3  2016 /dev/uio4
-rw-r--r-- 1 root root   0 Nov  3  2016 /dev/uio5
crw-rw 1 root users 240, 6 Nov  3  2016 /dev/uio6
crw-rw 1 root users 240, 7 Nov  3  2016 /dev/uio7
debian@beaglebone:~$ sudo rmmod uio_pruss
debian@beaglebone:~$ sudo modprobe uio_pruss
debian@beaglebone:~$ ls -l /dev/uio*
crw-rw 1 root users 240, 0 Mar 29 12:46 /dev/uio0
crw-rw 1 root users 240, 1 Mar 29 12:46 /dev/uio1
crw-rw 1 root users 240, 2 Mar 29 12:46 /dev/uio2
crw-rw 1 root users 240, 3 Mar 29 12:46 /dev/uio3
crw-rw 1 root users 240, 4 Mar 29 12:46 /dev/uio4
-rw-r--r-- 1 root root   0 Nov  3  2016 /dev/uio5
crw-rw 1 root users 240, 6 Mar 29 12:46 /dev/uio6
crw-rw 1 root users 240, 7 Mar 29 12:46 /dev/uio7
debian@beaglebone:~$ dmesg | grep uio
debian@beaglebone:~$

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/081b352e-680c-43b1-b7b7-d2ca858d52da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread TJF
Slow down, take a deep breath! I try to understand your system.

The first question is why is uio5 different than the others. By default 
since kernel 4.14 all devices are owned by root users. Why do you get root 
root for uio5? Why are all dates 2016 Nov., while uio5 is from today?

Please reload the driver and post the output from

sudo rmmod uio_pruss
sudo modprobe uio_pruss
ls -l /dev/uio*
dmesg | grep uio

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/195ee434-c85d-4509-beef-497bf820f2ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread CM

>
> Please post the full output of ls -l /dev/uio*
>
> Do you (your user ID) have write access to that files?
>

debian@beaglebone:~/analog$ ls -l /dev/uio*
crw-rw 1 root users 240, 0 Nov  3  2016 /dev/uio0
crw-rw 1 root users 240, 1 Nov  3  2016 /dev/uio1
crw-rw 1 root users 240, 2 Nov  3  2016 /dev/uio2
crw-rw 1 root users 240, 3 Nov  3  2016 /dev/uio3
crw-rw 1 root users 240, 4 Nov  3  2016 /dev/uio4
-rw-r--r-- 1 root root   0 Mar 29 08:30 /dev/uio5
crw-rw 1 root users 240, 6 Nov  3  2016 /dev/uio6
crw-rw 1 root users 240, 7 Nov  3  2016 /dev/uio7

When I add write access to /dev/uio5, and run my code (or example 1), I get 
a Bus error.

/dev/uio5 is listed in white, which means the system doesn't recognize it 
as a device, correct? 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ad923f31-7fcd-4888-a50c-2669bd356684%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread TJF
Am Donnerstag, 28. März 2019 16:58:08 UTC+1 schrieb CM:
>
> When I check the PRU availability, i.e. ls /dev/uio8, it shows uio0-7. All 
> are yellow but uio5.
>

Please post the full output of ls -l /dev/uio*

Do you (your user ID) have write access to that files?

Regards

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d13d7ab4-c0ee-460f-bd51-a96599fb5880%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread CM
Ok, I already have just AM335X-PRU-UIO-00A0.dtbo enabled.

So, if it's safe to say the issue is not with librobotcontrol, that brings 
me back to the initial problem.

I cannot run rb_file (or the code I wrote as a modification of it) - 
getting "constructor failed (cannot open /dev/uio5)"
When I run the example 1 - I get a seg fault.

Any thoughts?

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c0a0e7ba-2123-4393-afbe-6a845a3b7493%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread Robert Nelson
On Thu, Mar 28, 2019 at 10:58 AM CM  wrote:
>>
>> You should be fine then, just disable remoteproc_pruss and use
>> uio_pruss and ignore any of the librobotcontrol pru warnings..
>
>
> Forgive me if I'm oblivious, what are the steps I take to disable 
> remoteproc_pruss and use uio_pruss?
>
> Do you mean to comment out the PRU-RPROC dtbo files in uEnv.txt, blacklist 
> them in /etc/modprobe.d, or something else entirely?
>
> lsmod shows uio, uio_pdrv_genirq, and uio_pruss already loaded.
>
> When I check the PRU availability, i.e. ls /dev/uio8, it shows uio0-7. All 
> are yellow but uio5.

in /boot/uEnv.txt

only have this one uboot_overlay_pru define enabled:

uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYgMfhBExkDP1x%2By44Sz5wvNb3WPcfj9WcFmjr1FLbhE_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread CM

>
> You should be fine then, just disable remoteproc_pruss and use 
> uio_pruss and ignore any of the librobotcontrol pru warnings.. 
>

Forgive me if I'm oblivious, what are the steps I take to disable 
remoteproc_pruss and use uio_pruss?

Do you mean to comment out the PRU-RPROC dtbo files in uEnv.txt, blacklist 
them in /etc/modprobe.d, or something else entirely?

lsmod shows uio, uio_pdrv_genirq, and uio_pruss already loaded.

When I check the PRU availability, i.e. ls /dev/uio8, it shows uio0-7. All 
are yellow but uio5.

Thank you,
CM

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ff7a8b84-ae0e-4b59-9070-87152e4daf3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread Robert Nelson
On Thu, Mar 28, 2019 at 10:14 AM CM  wrote:
>
> Hello Robert,
>
> I am using a colleague's code to read the BeagleBone Blue's IMU/barometer. He 
> is using some of librobotcontrol in that. To be honest, I don't know 
> specifically what of librobotcontrol his code is using.
>
> To my understanding, it includes
>
> rc/math/kalman.h, filter.h, and quaternion.h
> rc/time.h, bmp.h, and mpu.h
>
> I am reading through the librobotcontrol source, but it doesn't look like any 
> of these use the PRU.

You should be fine then, just disable remoteproc_pruss and use
uio_pruss and ignore any of the librobotcontrol pru warnings..

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYhaK7XQ8FvepNp%3DJc4ZYPs7XPPa8jSnZ8g0bhrY0Ltang%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread CM
Hello Robert,

I am using a colleague's code to read the BeagleBone Blue's IMU/barometer. 
He is using some of librobotcontrol in that. To be honest, I don't know 
specifically what of librobotcontrol his code is using.

To my understanding, it includes 

   - rc/math/kalman.h, filter.h, and quaternion.h 
   - rc/time.h, bmp.h, and mpu.h


I am reading through the librobotcontrol source, but it doesn't look like 
any of these use the PRU.

I appreciate your insight into this.


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/de3815ad-176a-4a28-a1e2-d9502c85de10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread Robert Nelson
On Thu, Mar 28, 2019 at 9:04 AM CM  wrote:
>
> Thank you for the help regarding the driver conflict. I feared that might be 
> the case. I will have to look into running librobotcontrol with uio_pruss, as 
> you suggested.
>
> I also hope that Robert has some insight into my problem.
>
> Also, thank you for your efforts on libpruio. The times I am able to use it, 
> it works well!

librobotcontrol "pru" function calls are tied to remoteproc_pruss (v4.14.x-ti)

What features of librobotcontrol are you using?

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYguzXGvqH%3DTckAogn0UGq6SgMiMZj9JtDS%2BMFNSLi%2BCdw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread CM
Thank you for the help regarding the driver conflict. I feared that might 
be the case. I will have to look into running librobotcontrol with 
uio_pruss, as you suggested. 

I also hope that Robert has some insight into my problem.

Also, thank you for your efforts on libpruio. The times I am able to use 
it, it works well!

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3e42d1ae-e36d-4f1b-bf00-27ae13bc2bc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   >