I am almost there, I have pru 0 working ok.
Now, I want to have PRU 1 clocking on a pin as well.
I noticed in the this this syntax
pr1_pru0_pru_r30_15
Does that mean that both pr1 and pru0 can connect to that header pin at R30.15 ? Or just pru0?
For pru1, do I have to look for pr1_pru1… only?
Also, I start up my prus with the standard:
ret = prussdrv_open(PRU_EVTOUT_0);
However, most examples have one wait for a pru with the :
prussdrv_pru_wait_event (PRU_EVTOUT_0);
But I have two pru’s, and I need to wait twice (that call doesn’t have a pru number on it.
Do I need to initialize with another event (init twice) and then have one pru
trigger that event, and the other trigger the 0 event?
DTJF
June 9, 2014, 7:48am
2
Each PRUSS has its own set of output (and input) pins:
pr1_pru0_pru_… → PRU-0
pr1_pru1_pru_… → PRU-1
You can open more than one event. Default is:
And
prussdrv_pru_wait_event (PRU_EVTOUT_0); → wait for PRU-0
prussdrv_pru_wait_event (PRU_EVTOUT_1); → wait for PRU-1
But it’s also possible to customize the event mapping. Up to 8 events are available ( /dev/uio[0-7] ).
DTJF
June 9, 2014, 7:52am
3
Just found a typo in my previous post:
ret = prussdrv_open(PRU_EVTOUT_1); → PRU-0 to host
should be
ret = prussdrv_open(PRU_EVTOUT_1); → PRU-1 to host
Thank you so much! That was what I was thinking! I think this lets me put the last few things together.
One other question if I may.
In the constants table, it has C24 as the entry for: PRU0/1 Local Data
and C25 as the entry for: PRU1/0 Local Data
Is the 8K data banked in two banks for 4k?
Just trying to figure out what C25 is referencing.
Look at the addresses for the constants, and refer to the global memory
map. C24 is for each PRU core's local data memory, mapped at address
0x0000, and C25 is the _other_ PRU's local memory, mapped at address 0x2000.