esp8266 / esp8266/Arduino

delayMicroseconds uncorrect, about 50 ticks too much

Open
#4,632 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

I measured the following delays in CPU ticks (80 MHz):

```
delayMicroseconds(1) : 130 ticks, 50 ticks too much
delayMicroseconds(2) : 202 ticks, 42 ticks too much
delayMicroseconds(3) : 286 ticks, 46 ticks too much
delayMicroseconds(4) : 370 ticks, 50 ticks too much
delayMicroseconds(5) : 442 ticks, 42 ticks too much
```

Couldn't a precise function be implemented?

I measured these values during a NMI interrupt, the behaviour is always the same and reproducable.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.