Well, call me crazy, but I copied the same code as posted in first mail and now works fine. Kill me if I know whats is/was going on.
I enable PRU with following command: echo "BB-BONE-PRU-01" > $SLOTS For load I use Python PRU library called "pypruss", and here it it how it looks like: import sys import pypruss pypruss.modprobe() # This only has to be called once pr boot pypruss.init() # Init the PRU pypruss.open(0) # Open PRU event 0 which is PRU0_ARM_INTERRUPT pypruss.pruintc_init() # Init the interrupt controller pypruss.exec_program(0, "./" + sys.argv[1]) # Load firmware on PRU 0 pypruss.wait_for_event(0) # Wait for event 0 which is connected to PRU0_ARM_INTERRUPT pypruss.clear_event(0) # Clear the event pypruss.pru_disable(0) # Disable PRU 0, this is already done by the firmware pypruss.exit() # Exit, don't know what this does. I don't know: maybe I was just tired or there is some hidden glitch. Anyway thx guys for the help - if nothing, I did learned few new things :) I appreciate it... BR Ivan On Wednesday, October 2, 2013 4:49:20 PM UTC+2, Charles Steinkuehler wrote: > > On 10/2/2013 9:30 AM, Thomas Mauer wrote: > > Ivan, > > > > You should check again the QBLT usage< > http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions#Quick_Branch_if_Less_Than_.28QBLT.29>. > > > > > > The code will stay in your loop when rT2 < rT1 i.e. IEPcount < 1. > > Try QBLT L1, rT2, rT1 > > I think the existing QBLT is correct, it should loop while the counter > (rT2) is less than the timeout value (rT1). The timeout is set to one > for testing, right? > > I loaded up the code in the single-step debugger and it ran as expected, > so perhaps there is something wrong other than the code. How are you > loading the device-tree overlay for the PRU, and which overlay are you > using? What are you using to load the code into the PRU, reset it, and > set the operating mode? I ran my test on a system that had been > actively running LinuxCNC, so I know the PRU was already setup, and I > know the PRU program loading code works. > > -- > Charles Steinkuehler > [email protected] <javascript:> > > -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
