Looking at some example code from TI I can see multiple repeated NOP instructions as shown below
I am using a Piccolo A processor
---start example---
MOV @_EPwm4Regs.AQCTLB, #0x0115
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOVW DP,#_EPwm2Regs.TZCTL
---end example--
I note that the "NOP" instruction can be used with "RPT". Is the does the following code take the same time to execute and does the answer change depending on if this code is in Flash or RAM? It clearly takes up less space and requires the processor to fetch less instructions does that mean the following code will run faster?
If I have counted correctly there were 18 NOP instructions above
---start example---
MOV @_EPwm4Regs.AQCTLB, #0x0115
RPT #17
|| NOP MOVW DP,#_EPwm2Regs.TZCTL
---end example--
Thanks In advance
Warren