circuitpython: RPI pico W is not always detected as disk in Windows 10

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-20; Raspberry Pi Pico W with rp2040

Code/REPL

import time
import board
import digitalio

led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT

while True:
    print("test")
    led.value = not led.value
    time.sleep(1)

Behavior

Board is not always detected as disk in windows 10.

Description

  • Boot works always fine, and circuit python disk is always detected after UF2 flashing reset.
  • After disconnect / turn off, the board is not detected as disk in most cases
  • I wrote blink script and powered board from phone charger and program runs / blink only 1 of 5-8 tries
  • I was thinking about possible faulty hardware, so I flashed Adafruit CircuitPython 7.3.1 on 2022-06-22; Raspberry Pi Pico with rp2040 and windows always detects it as circuit python disk

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 35 (11 by maintainers)

Commits related to this issue

Most upvoted comments

If the analysis in that other PR (“it looks like the wireless firmware is being loaded during USB device enumeration”) is correct, I do not think they would be the same cause.

In CircuitPython, we load the firmware during port_init which I think is before USB enumeration can possibly occur (usb_init is called later in supervisor_workflow_start)