← index #17792Issue #15751
Off-topic · high · value 1.917
QUERY · ISSUE

OSError 16 from time.sleep_ms()

openby victorallumeopened 2025-07-31updated 2025-08-05
bugport-stm32

Port, board and/or hardware

stm32

MicroPython version

MicroPython v1.25.0

Reproduction

This is on a custom board. Code during the boot process calls time.sleep_ms(1100)

  1. Hard reset the board
  2. boot/main code starts running fine
  3. Break out to a repl
  4. (at this point, I can run time.sleep_ms() without problem)
  5. soft reset the board
  6. during the boot process, call to sleep_ms() fails

I cannot replicate the issue on v1.24.0 (i.e. something has changed going to v1.25.0)

Expected behaviour

No response

Observed behaviour

Call to time.sleep_ms() raises OSError 16 in the above conditions

Additional Information

This is running on a custom board with an STM32H743 MCU.

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

machine.lightsleep makes time.sleep_ms takes more time on every call

openby staltuxopened 2024-08-30updated 2024-09-01
bug

Port, board and/or hardware

rp2040

MicroPython version

MicroPython v1.23.0 on 2024-06-02; Raspberry Pi Pico with RP2040

Reproduction

while True:
# omitted code to turn led on and off
time.sleep_ms(500)
machine.lightsleep(4000)

Expected behaviour

every call to time.sleep_ms(500) should take the same time

Observed behaviour

the led take more and more time to turn on and off after the same sleep_ms()

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied