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

SDK • Re: rp2350 with tinyusb (device) - "slow" with FreeRTOS

$
0
0
A clue I just discovered is that it has something to do with how vTaskDelay() is working in the RP2350 port.

With RP2040 it works as expected, but with RP2350 vTaskDelay() seems to delay a LOT longer than expected.

My FreeRTOSConfig.h has the following:

Code:

#define configSYSTICK_CLOCK_HZ(120000000)#define configTICK_RATE_HZ((TickType_t)1000)
Which should give me one millisecond FreeRTOS ticks. This is correct with RP2040.

And my tinyusb thread is pretty simple:

Code:

static void tud_main(__unused void *ctx){tud_init(0);stdio_init_all();while (1) {tud_task();vTaskDelay(pdMS_TO_TICKS(1));};}
With the code as shown, it takes 15 seconds for the RP2350 USB device to show up. If I eliminate the vTaskDelay() or replace it with portYIELD() it's instantaneous (which is how the RP2040 behaves as well).

I'm currently working my way through the maze of indirection in FreeRTOS to see what's happening differently on RP2350 vs RP2040, but this looks like where the issue is.

Statistics: Posted by anotherandrew — Thu Jan 15, 2026 9:37 pm



Viewing all articles
Browse latest Browse all 8013

Trending Articles