The loop it's a little bit different there (tinyusb/hw/bsp/rp2040/family.c):However, it's a bad idea:
Code:
// Note we can't call into any sleep functions in flash right now for (volatile int i = 0; i < 1000; ++i) { __nop(); }Also it can mess up the USB by blocking it's interrupt response, especially if doing it in debugging mode, at least on Windows the device gets disabled in no time if not responding quickly enough (malfunction). Maybe this is the problem here.// This doesn't work if others are trying to access flash at the same time,
// e.g. XIP streamer, or the other core.
Statistics: Posted by gmx — Fri Nov 14, 2025 3:50 am