diff options
| author | robert-hh <robert@hammelrath.com> | 2022-09-29 16:13:23 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-10-25 23:26:14 +1100 |
| commit | e33db80a5958772095a16b0b3753ed3aa72d07b2 (patch) | |
| tree | 8ac0e50a7c3e09f8c581a221e2be4cb2e5eb28cc /py/builtinimport.c | |
| parent | fc9d66fac64422a6a6ea4a79bfd8b2460cc8e9e8 (diff) | |
samd/clock_config: Extend the SAMD51 us-counter to 60 bit.
This removes the difference in the time.ticks_us() range between SAMD21 and
SAMD51.
The function mp_hal_ticks_us_64() is added and used for:
- SAMD51's mp_hal_ticks_us and mp_hal_delay_us().
For SAMD21, keep the previous methods, which are faster.
- mp_hal_ticks_ms() and mp_hal_tick_ms_64(), which saves some bytes
and removes a potential race condition every 50 days.
Also set the us-counter for SAMD51 to 16 MHz for a faster reading of the
microsecond value.
Note: With SAMD51, mp_hal_ticks_us_64() has a 60 bit range only, which is
still a long time (~36000 years).
Diffstat (limited to 'py/builtinimport.c')
0 files changed, 0 insertions, 0 deletions
