This procedure should take about 80ns to run when ever called. The
syntax looks good.
If called from a procedure running on a PRU subsystem, it should soak up
the cycles.
If called from a script running on sysfs, all bets are off on timing. It
might take 200ns or longer.
If you give more information, it would be easier to zero in on the problem.
Chad
On 1/20/16 10:44 AM, Tyler Turcotte wrote:
I am currently working on a project that requires many delays in my
code to get the timing correct. I want to call a subroutine multiple
times through my main code to execute a simple delay. Right now I
just use.
|
CALL DELAY2
|
Which I then have the following code to create a delay before it
returns back to my original code to keep moving along.
|
DELAY2:
MOV r8,20
DEC:
SUB r8,r8,1
QBNE DEC,r8,1
RET
|
This doesn't seem to delay my code all the time and doesn't always
seemed to get called. It gets called approximately 25 times in my script.
Write now I have the subroutine placed after my end statement. I have
tried it in my main code as well but seems to go out of its loop.
Is this the proper syntax to execute a subroutine on the PRU?
Thanks,
Tyler
--
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]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
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/d/optout.