You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In CircuitPython we open endpoints before we use them. We only track what we use for a small period of time while the VM is running. If a second VM run opens an endpoint it will call open a second time. On PIO USB host code, this causes a second allocation for the open endpoint and basically leaks the memory of the first. Eventually the endpoint opening will fail because it is out of memory: https://github.com/sekigon-gonnoc/Pico-PIO-USB/blob/main/src/pio_usb_host.c#L436 A hard reset is needed to recover.
Describe the solution you'd like
Please add an API to close an endpoint. We'll do this before our shorter lived tracking object is deleted and free the underlying memory.
Related area
Host API
Hardware specification
RP2 PIO usb host code
Is your feature request related to a problem?
In CircuitPython we open endpoints before we use them. We only track what we use for a small period of time while the VM is running. If a second VM run opens an endpoint it will call open a second time. On PIO USB host code, this causes a second allocation for the open endpoint and basically leaks the memory of the first. Eventually the endpoint opening will fail because it is out of memory: https://github.com/sekigon-gonnoc/Pico-PIO-USB/blob/main/src/pio_usb_host.c#L436 A hard reset is needed to recover.
Describe the solution you'd like
Please add an API to close an endpoint. We'll do this before our shorter lived tracking object is deleted and free the underlying memory.
This needs to be updated to call it:
https://github.com/adafruit/circuitpython/blob/2af397ed1ca94846ed084d85a393b995e90460a8/shared-module/usb/core/Device.c#L53
I have checked existing issues, dicussion and documentation
The text was updated successfully, but these errors were encountered: