8000 Pico W: sleep_us causes execution to hang · Issue #12873 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
Pico W: sleep_us causes execution to hang #12873
Closed
@danielteel

Description

@danielteel

Firmware version: MicroPython v1.21.0 on 2023-10-06; Raspberry Pi Pico W with RP2040

On both of my Pico W devices, if I execute the below code on a freshly booted device, it causes execution to hang.

import time

time.sleep_us(5)
time.sleep_us(10)
time.sleep_us(5)
time.sleep_us(10)

time.sleep_ms(1000)
print('its been a second')#doesnt print

The expected output is

its been a second

But the output is

To reproduce this:

  1. create a file called bug.py, insert the above code into it
  2. upload the file to the pico w
  3. do a hard reset
  4. in the REPL terminal execute import bug
  5. execution will hang and will not print the text

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0