I have a project in which I'm running somewhat tight loops on both cores, using the FIFO to share data between them. I have some delayMicroseconds() calls in both loops.
Now I need to increase performance, so I have lowered the delay times, which causes the Arduino IDE to tell me the RP2040 is "not connected" or, in some cases with slightly longer delays, it shows up as connected, but an upload will not succeed, so I have to reset it to boot from USB, upload any other sketch and then upload my program again.
I have tried replacing the delays with calls to sleep_us() with no avail.
Is there anything else I can do to assure that I will keep USB connectivity, like a regular check or poll? Or is it just about long enough delays?