Re: [beagleboard] Re: Reading ADC with both PRUs

2021-06-11 Thread 'Mark Lazarewicz' via BeagleBoard
Hello Walter
Two ansychronous processor's it's entirely possible eventually ones writing and 
other is reading and gets bad Data that's why they invented hardware dual port 
ram.
Ping pong circular buffer's work on one processor systems you disable 
interrupts in critical regions or lock it with a mutex controlled by RTOS.
Perhaps it's not critical
How long have you been waiting on an answer just curious?
Mark

Sent from Yahoo Mail on Android 
 
  On Fri, Jun 11, 2021 at 12:33 PM, Dennis Lee 
Bieber wrote:   On Fri, 11 Jun 2021 09:44:27 -0700 
(PDT), in
gmane.comp.hardware.beagleboard.user Walter Cromer
 wrote:

>I can have PRU1 do all the ADC configuration including setting up steps 1, 
>2 and 3 to read three analog lines in one-shot mode while steps 4 & are set 
>up to read the other two analog lines in continous mode.  I'll write data 
>from steps 1, 2 and 3 into FIFO0 and 4 & 5 into FIFO1.  
>
>The question is can PRU0 read FIFO0 while PRU1 might try to read FIFO1 at 
>the same time?  

    Given that each PRU is capable of accessing the other's data RAM (as I
recall, each PRU sees its RAM at address 0, and sees the other's RAM at
some fixed offset), I'd probably use a few words of PRU0's RAM and have
PRU1 write into that space, along with a timestamp value -- PRU0 would look
for a change in the timestamp, then grab the ADC values (allowing PRU1 to
write new values while PRU0 processes the previous set -- Or PRU0 clears
the timestamp [which is no longer a timestamp] which PRU1 sees as "okay to
write new values", PRU1 then sets the timestamp byte to tell PRU0 "okay to
read". Closest I can come to a shared semaphore/mutex (are there any
synchronization primitives in the PRU runtime?).


-- 
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/s377cghljsjo1uhfmsn4sbj7bi1206lcnq%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/1034361247.3488153.1623446916131%40mail.yahoo.com.


[beagleboard] Re: Reading ADC with both PRUs

2021-06-11 Thread Walter Cromer
I'm going to hold on to this as a backup option.   I'm already using the 
shared memory space so that's another option but writing to PRU0's local 
RAM may be faster.  I don't know.   The monitor/control that PRU1 is doing 
doesn't would be just fine with a 1-second read interval I think.  The 
three lines that PRU0 is already reading in this application require at 
least 3ms intervals or better.   

Thanks for the good idea on this.

Walter

On Friday, June 11, 2021 at 1:33:05 PM UTC-4 Dennis Bieber wrote:

> On Fri, 11 Jun 2021 09:44:27 -0700 (PDT), in
> gmane.comp.hardware.beagleboard.user Walter Cromer
>  wrote:
>
> >I can have PRU1 do all the ADC configuration including setting up steps 
> 1, 
> >2 and 3 to read three analog lines in one-shot mode while steps 4 & are 
> set 
> >up to read the other two analog lines in continous mode. I'll write data 
> >from steps 1, 2 and 3 into FIFO0 and 4 & 5 into FIFO1. 
> >
> >The question is can PRU0 read FIFO0 while PRU1 might try to read FIFO1 at 
> >the same time? 
>
> Given that each PRU is capable of accessing the other's data RAM (as I
> recall, each PRU sees its RAM at address 0, and sees the other's RAM at
> some fixed offset), I'd probably use a few words of PRU0's RAM and have
> PRU1 write into that space, along with a timestamp value -- PRU0 would look
> for a change in the timestamp, then grab the ADC values (allowing PRU1 to
> write new values while PRU0 processes the previous set -- Or PRU0 clears
> the timestamp [which is no longer a timestamp] which PRU1 sees as "okay to
> write new values", PRU1 then sets the timestamp byte to tell PRU0 "okay to
> read". Closest I can come to a shared semaphore/mutex (are there any
> synchronization primitives in the PRU runtime?).
>
>
> -- 
> 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/78f2bd55-726a-4b03-9cf4-345d6486ec59n%40googlegroups.com.


[beagleboard] Re: Reading ADC with both PRUs

2021-06-11 Thread Dennis Lee Bieber
On Fri, 11 Jun 2021 09:44:27 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Walter Cromer
 wrote:

>I can have PRU1 do all the ADC configuration including setting up steps 1, 
>2 and 3 to read three analog lines in one-shot mode while steps 4 & are set 
>up to read the other two analog lines in continous mode.  I'll write data 
>from steps 1, 2 and 3 into FIFO0 and 4 & 5 into FIFO1.  
>
>The question is can PRU0 read FIFO0 while PRU1 might try to read FIFO1 at 
>the same time?  

Given that each PRU is capable of accessing the other's data RAM (as I
recall, each PRU sees its RAM at address 0, and sees the other's RAM at
some fixed offset), I'd probably use a few words of PRU0's RAM and have
PRU1 write into that space, along with a timestamp value -- PRU0 would look
for a change in the timestamp, then grab the ADC values (allowing PRU1 to
write new values while PRU0 processes the previous set -- Or PRU0 clears
the timestamp [which is no longer a timestamp] which PRU1 sees as "okay to
write new values", PRU1 then sets the timestamp byte to tell PRU0 "okay to
read". Closest I can come to a shared semaphore/mutex (are there any
synchronization primitives in the PRU runtime?).


-- 
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/s377cghljsjo1uhfmsn4sbj7bi1206lcnq%404ax.com.


[beagleboard] Reading ADC with both PRUs

2021-06-11 Thread Walter Cromer
I have asked this of TI but haven't really gotten a firm answer and I can't 
seem to find a clear discussion in the Technical Reference Manual.

I would like to set up PRU1 to monitor two analog input lines and take an 
action on two GPIOs depending on the values it reads.  It would just be 
started by either the host program through remoteproc or by PRU0.  

Simultaneously, I need PRU0 to read three other analog lines and do more 
complex control work with those.  

I can have PRU1 do all the ADC configuration including setting up steps 1, 
2 and 3 to read three analog lines in one-shot mode while steps 4 & are set 
up to read the other two analog lines in continous mode.  I'll write data 
from steps 1, 2 and 3 into FIFO0 and 4 & 5 into FIFO1.  

The question is can PRU0 read FIFO0 while PRU1 might try to read FIFO1 at 
the same time?  

-- 
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/525d424f-91dc-4f3a-9be6-f714e1f62bf2n%40googlegroups.com.


[beagleboard] Re: I cant connect BeagleBoard Black to 192.168.7.2 with PREEMPT_RT

2021-06-11 Thread Patrick Bolton
Chapter 2: The Beagle Board Software – Exploring BeagleBone 


Network & Internet >> Change adapter options

Network source >> properties >> share with BBB

BBB >> properties >> ipv4 >> automatically assign

open terminal

/sbin/route add default gw 192.168.7.1
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
ping www.google.com or any other consistently stable website



On Thursday, June 10, 2021 at 6:47:19 PM UTC-7 Marcelo Castelao wrote:

> Hi,
> I have a RealTime SO in a BleagleBone Black revC, I cant connect 
> BeagleBoard Black to 192.168.7.2 to connect with Cloud9. I only have  acces 
> to USB port. 
>
> My kernel is:
> uname -a:
> Linux beaglebone 4.19.190-bone-rt-r65 #1buster PREEMPT RT Thu May 13 
> 22:32:18 UTC 2021 armv7l GNU/Linux
>
> I dont have an idea
>
>

-- 
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/e54a69d1-6cd2-43ee-834e-5dfaf8e1201cn%40googlegroups.com.