8000 Cyw43 PIO SPI always busy waits, even for large transfers · Issue #2343 · raspberrypi/pico-sdk · GitHub
[go: up one dir, main page]

Skip to content

Cyw43 PIO SPI always busy waits, even for large transfers #2343

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

Open
esky-software opened this issue Mar 10, 2025 · 0 comments
Open

Cyw43 PIO SPI always busy waits, even for large transfers #2343

esky-software opened this issue Mar 10, 2025 · 0 comments
Assignees
Milestone

Comments

@esky-software
Copy link
Contributor

The function cyw43_spi_transfer() busy waits on the transfer DMA channel(s), even for large transfers.
This is far from optimal in an RTOS or other asynchronous environment.

We might use DMA interrupts to handle the completion of the transfer, but this would require some restructuring of the driver code.

More simply, we can estimate the duration of the transfer, and if it's larger than a threshold call cyw43_delay_us() to sleep via the async context before starting the busy wait for the end of the transfer.

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

No branches or pull requests

2 participants
0