Knowledge Base Article
Answer: The CyDelay functions, CyDelay() and CyDelayUs(), implement simple software-based delay loops. The loops are designed to compensate for bus clock frequency and other factors, but there are additional factors that may also influence the actual time spent in the loop. You can calculate the delay time of each function by counting up the assembly instruction implementation time.
If you need a more accurate method of calculating the delay time, consider using hardware (PWM, Timer, SysTick) mode.