Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FreeRTOS support thanks to @hfellner #533

Merged
merged 23 commits into from Apr 25, 2022
Merged

Add FreeRTOS support thanks to @hfellner #533

merged 23 commits into from Apr 25, 2022

Conversation

earlephilhower
Copy link
Owner

Using all the work from @hfellner and others. Things work but are not
stable (i.e. flash operations will make things go badly, fast; delay()
does not actually release the core for other work, etc.).

Using all the work from @hfellner and others.  Things work but are not
stable (i.e. flash operations will make things go badly, fast; delay()
does not actually release the core for other work, etc.).
@hfellner
Copy link

Making delay() release the core for other work would be simple by making the default implementation a weak symbol and providing an override in the RP2040_FreeRTOS library that calls vTaskDelay(delay / portTICK_PERIOD_MS). However, this cannot be done for delayMicroseconds(), because the minimum yield period for FreeRTOS on the RP2040 is 1ms.

@earlephilhower earlephilhower marked this pull request as ready for review April 20, 2022 01:19
@earlephilhower earlephilhower changed the title WIP - Add FreeRTOS support thanks to @hfellner Add FreeRTOS support thanks to @hfellner Apr 20, 2022
Use a task-based approach for handling the USB periodic work instead
of the IRQ-based one in the main core.

Fix a hang under -Os (but not under any other conditions?!) caused by
the (unused) FIFO IRQ handler.

Set 8 prio levels so it fits in 3 bits nicely (0..7)
@earlephilhower earlephilhower merged commit bda630e into master Apr 25, 2022
@earlephilhower earlephilhower deleted the freertos branch April 25, 2022 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants