On 5/25/2017 9:01 AM, M Pitman wrote:
>
> If anyone can shed any light on what I'm seeing with the __delay_cycles command
> I would be interested in hearing about it. Thanks.
Program the PRUs in assembly, especially if you want single cycle
accuracy.
...or at least provide us the assembly listing for the C code, as well
as the entire C program. There are lots of things that can be
happening behind the scenes since you're using C.
On the MPS-430, for example, the __delay_cycles() routine actually
turns off most of the processor (to save power) and wakes it back up
after the delay expires, which could obviously cause unexpected
behavior if you didn't realize that's what it was doing. I don't use
C compiler so I'm not sure how this routine is implemented for the
PRU, but it probably isn't a simple noop loop like you might expect.
--
Charles Steinkuehler
cha...@steinkuehler.net