Commit graph

8 commits

Author SHA1 Message Date
Ivan Grokhotkov
0808a04ee8 esp_timer: reduce overflow value in unit tests
This allows testing for race conditions which occur near timer
overflow point more effectively.
2018-07-09 12:06:11 +08:00
Ivan Grokhotkov
c99977b67c esp_timer: don’t busy loop in esp_timer_impl_set_alarm
Previously the loop in esp_timer_impl_set_alarm was necessary to catch
the case when timer count wraps around (goes from 2^32 - 1 to 0).
Since ALARM_OVERFLOW_VAL was reduced from 2^32 - 1 to 0xefffffff,
this is no longer necessary.

Fixes https://github.com/espressif/esp-idf/issues/1891
2018-07-09 12:06:11 +08:00
Tian Hao
c574ad90df component/esp32: fix esp_timer bug
1. fix the bug that cause esp_timer_get_time is not accuracy(the max margin may be 106s).
2. fix the bug that causes esp timer come too early.
2018-03-13 15:03:54 +08:00
Jack
4837f93968 esp_timer:fix three bugs about timer get and timer alarm where overflow is not correct 2017-12-19 20:07:45 +08:00
Ivan Grokhotkov
eb0c34e5c9 esp_timer: add support for frequency scaling 2017-10-18 14:19:18 +08:00
Angus Gratton
094cf4d79d wifi/bt coexistence: Fix disabled cache access race when writing to flash
Moves the ets_timer_arm() / ets_timer_disarm() code paths to RAM

Overhead is 740 bytes of IRAM, 0 bytes DRAM

(For comparison: If all of esp_timer.c is moved to RAM, overhead is 1068 bytes IRAM and 480 bytes DRAM.)
2017-10-16 19:47:33 +08:00
Ivan Grokhotkov
1af6384349 esp_timer: lock-free implementation of esp_timer_get_time
The implementation of esp_timer_get_time used a critical section, which
resulted in a call time of ~1.8us. To make esp_timer_get_time more
useable as a high-resolution time source, this change replaces the lock
with polling. Call time is reduced to ~0.7us.
2017-09-01 10:34:36 +08:00
Ivan Grokhotkov
857a29872d esp_timer: add high resolution software timer API 2017-08-28 11:35:26 +08:00