Skip to content

"Cannot remount '/' when USB is active." even when USB disconnected (nRF52840) #2509

Open
@urish

Description

@urish

I'm getting a "Can't remount '/' when USB is active" error, when calling storage.remount("/", False) , despite the fact USB is not connected while the command is running.

Steps to reproduce

The board has to be battery powered, so that it keeps running the code even when USB is disconnected.

  1. Get into CircuitPython REPL (over USB-CDC)
  2. Type the following code:
import storage
import time
try:
  time.sleep(15)
  success = False
  storage.remount("/", False)
  success = True
except Exception as exc:
  error = exc
  1. Quickly disconnect the board from USB, and wait for 15 seconds (or more)
  2. Reconnect the board and reopen the REPL, and then inspect the value of success and error. You will see this output:
>>> success
False
>>> error
RuntimeError("Cannot remount '/' when USB is active.",)
>>> 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions