Is there a NOP opcode for the PRU?

This seems like a question that ought to be easy to answer but so far my searching has not turned up a clear one. I need a NOP on occasion to balance out timing on things and thus far every iteration I have tried of NOPx results in ‘instruction illegal for core version’. I’m having to do dummy register loads now which looks kind of goofy. Is there a NOP instruction that works in PRU assembly?

I don't think there's a specific NOP, but since the PRU doesn't have
flag bits (except for carry) to worry about, you can alias any of a
number of instructions to be a NOP:

  AND r1, r1, r1
   OR r1, r1, r1
  XOR r1, r1, 0
  MOV r1, r1

...and so on.

Hi!

The assembler also supports a NOPn operation (NOP0 - NOPf). See SRM chapter 5.3.4.1.18 for details.

BR

I read that (SRM page 61) and mentioned in my post that I had tried them. “thus far every iteration I have tried of NOPx results in ‘instruction illegal for core version’”. NOP0, NOP1, NOP2, NOP3, ect all give the same result. The SRM says they are undefined and doesn’t provide much insight beyond that. I can go the .macro route but it seems awkward, and I’ve never worked on a platform that didn’t have a NOP instruction. If the .macro works then so be it, I just need the instruction to take 5ns. I don’t much care how it does it really. I just don’t want to add confusion by it being duplicate instructions.

I was unable to use the NOPx instructions, same error. But you can define a macro, ex:
.macro NOP
MOV r1, r1
.endm

.macro NOP2
MOV r1, r1
MOV r1, r1
;endm

and so on. Your code will look more readable.

Yep, that approach works well. Thanks!