Commit Graph

2 Commits

Author SHA1 Message Date
robert-hh
99221cd118 mimxrt: Fix cycle counter for time.ticks_cpu() and machine.bitstream().
Prior to this commit mp_hal_ticks_cpu() was not started properly.  It only
started when the code was executed with a debugger attached, except for the
Teensy (i.MXRT1062) boards.  As an additional fix, the CYYCNT timer is now
started at boot time.

Also rename mp_hal_ticks_cpu_init() to mp_hal_ticks_cpu_enable().
2021-10-25 15:50:44 +11:00
robert-hh
61b7c098b9 mimxrt/machine_bitstream: Add bitstream function to machine module.
Following the code example for ESP32 of Jim Mussard.

As a side effect:
- mp_hal_ticks_cpu() was implemented,
- mp_hal_get_cpu_freq() and mp_hal_ticks_cpu_init() were added and used.
- mp_hal_pin_high() and mp_hal_pin_low() were changed for symmetry
2021-09-10 13:32:53 +10:00