Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

General • Re: Why does my code gets stuck in a loop here

$
0
0
The loop it's a little bit different there (tinyusb/hw/bsp/rp2040/family.c):

Code:

  // Note we can't call into any sleep functions in flash right now  for (volatile int i = 0; i < 1000; ++i) {    __nop();  }
However, it's a bad idea:
// This doesn't work if others are trying to access flash at the same time,
// e.g. XIP streamer, or the other core.
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.

Statistics: Posted by gmx — Fri Nov 14, 2025 3:50 am



Viewing all articles
Browse latest Browse all 7503

Trending Articles