circuitpython: time.sleep() not working in 6.0.1 in a Blink program

Splitting this issue off from #3829:

from @dkirkby:

I just followed the Welcome to CircuitPython instructions for writing your first program on a Metro M4, using the recommended stable 6.0.1 and Mu editor, and it is now broken because time.sleep hangs.

Having a working new user tutorial is important, but that could mean simply downgrading the recommended stable release if there isn’t a simple fix to the sleep issue.

_Originally posted by @dkirkby in https://github.com/adafruit/circuitpython/issues/3829#issuecomment-753343698_

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24

Most upvoted comments

There were three bugs fixed: one was actually in the time.sleep() code, and was a truncation of a 64 bit large count to 32 bits. The other were two buffer overruns in tinyusb, one due to a value we didn’t know we needed to define larger (the default value was increased), and the other due to an obscure feature in the USB peripheral that stores the CRC bytes after the actual USB message. The latter bug only affected sleep by accident, because a static variable used by sleep was immediately after the overrun buffer. Details in #3953.