mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 04:00:28 +01:00
samd/machine_bitstream: Add the machine.bitstream() function.
The SAMD21 implementation is an adaption of @jimmo's code for STM32Lxx. The only changes are the addresses and names of the port registers and the timing parameters. SAMD21: The precision is about +/-25ns at 48MHz clock frequency. The first two cycles are about 40-60 ns longer than set. But still good enough to drive a neopixel device. SAMD51: The precision is about +/-30ns at 120MHz clock frequency. Good enough to drive a neopixel device.
This commit is contained in:
@@ -111,7 +111,7 @@ void samd_init(void) {
|
||||
SysTick_Config(get_cpu_freq() / 1000);
|
||||
init_us_counter();
|
||||
usb_init();
|
||||
#if defined (MCU_SAMD51)
|
||||
#if defined(MCU_SAMD51)
|
||||
mp_hal_ticks_cpu_enable();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user