This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

_nop_()

Hi,

I have just taken a project already started on the ST10F168. My problem is to understand when I am obliged to use the _nop_() function. Because in my project, it's using in abundance...Is it really necessary ??

When you set a port or a state(input/output), do you put a _nop_() (or 2) after ??
In general, when the use of this function is necessary ??

Thanks in advance

Regards

JM

Parents
  • I have done several projects with C166 and I don't remember ever having used _nop_() (or the assembeler instruction NOP for that matter).

    There are some pipeline effects where the instruction could be used, but these are rare and usually you can do something useful instead of putting in a NOP.

    Also, there could be a place for a few NOPs when generating a short pulse with an I/O pin and there is some minimum width for the pulse.

Reply
  • I have done several projects with C166 and I don't remember ever having used _nop_() (or the assembeler instruction NOP for that matter).

    There are some pipeline effects where the instruction could be used, but these are rare and usually you can do something useful instead of putting in a NOP.

    Also, there could be a place for a few NOPs when generating a short pulse with an I/O pin and there is some minimum width for the pulse.

Children