28.2.111 __builtin_repeat_nop

Architecture

dsPIC33A, dsPIC33C/E/F, dsPIC30

Description

Produce a delay using the machine repeat instruction. Depending upon the device, there are different limitations on the maximum repeat count which may depend upon whether or not it is a literal or variable amount; please ensure that the repeat delay is within bounds for the currently selected device.

Note: A repeat instruction will consume 1 cycle and delay 1 + repeat count cycles; therefore an argument of 3 will get 5 cycles of delay. Other options include the __delay32() function, see MPLAB XC-DSC Libraries Reference Manual (DS-50003591) for a description.

Prototype

void __builtin_repeat_nop(unsigned int delay);

Argument

delay – Number of cycles to repeat.

Return Value

None.

Machine Instructions

repeat <delay>
nop

Error Messages

None