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
# grab the code sample from https://learn.adafruit.com/introducing-feather-rp2040-scorpio/using-adafruit_neopxl8
Behavior
Sometimes the USB device will disconnect and reconnect.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
157.9fps
154.2fps
159.0fps
156.6fps
[tio 16:28:51] Disconnected
[tio 16:28:52] Connected
[tio 16:28:53] Disconnected
[tio 16:28:54] Connected
156.7fps
156.4fps
158.7fps
154.6fps
156.3fps
156.6fps
Description
Compared to most boards / exampes, this is using two less used features: StateMachine.background_write and bitops.bit_transpose.
Additional information
This or something like it has been seen by me, @jedgarpark and @djecken as discussed on slack. I'm on a prerelease board while they have store revisions.
The text was updated successfully, but these errors were encountered:
Would either of these spend time in a tight loop and freeze out USB task handling?
I looked for that, as it's the first explanation that occurred to me too.
background_write has one place where it loops (based on the status of an ongoing DMA transaction), but it calls RUN_BACKGROUND_TASKS every loop.
bit_transpose is a tight loop, but it runs with interrupts enabled:
static void bit_transpose_8(uint32_t *result, const uint8_t *src, size_t src_stride, size_t n) {
for (size_t i = 0; i < n; i++) {
transpose_8(result, src, src_stride);
result += 2;
src += 1;
}
}
but for the amount of data being processed (8 strands of 30 LEDs at 24bpp), the time is only ~100us.
Another possible explanation would be electrical, though I don't like it: the PIO program, when running, causes 8 outputs to switch at the same time, and with wiring problems that can amount to ~400mA being switched on and off. something ground bounce something words an EE would say?
Just running the bitops.bit_transpose in a loop did not reproduce the problem over the course of 5 minutes.
Based on internal discussions, this is also affecting Arduino. Internal testing indicates that reducing the drive strength on the #16-23 pins to 2mA seems to fix it.
CircuitPython version
Code/REPL
# grab the code sample from https://learn.adafruit.com/introducing-feather-rp2040-scorpio/using-adafruit_neopxl8
Behavior
Sometimes the USB device will disconnect and reconnect.
Description
Compared to most boards / exampes, this is using two less used features:
StateMachine.background_write
andbitops.bit_transpose
.Additional information
This or something like it has been seen by me, @jedgarpark and @djecken as discussed on slack. I'm on a prerelease board while they have store revisions.
The text was updated successfully, but these errors were encountered: