multicore: multicore_fifo_pop_timeout_us doesn't work as expected #1142

Closed
opened 2022-12-13 10:51:47 -06:00 by DipSwitch · 1 comment
DipSwitch commented 2022-12-13 10:51:47 -06:00 (Migrated from github.com)

While in theory the function multicore_fifo_pop_timeout_us(timeout, *out) looks workable, in practice it doesn't work as desired.
Because the usage of __wfe() it doesn't respect it's given timeout. Since there is no call to __sev() on the other core the __wfe() is endless since there is no sev instruction executed.

A solution would be to make it a busy wait.

Don't know if SEVONPEND could help with this problem of some sort? Maybe set the timeout in an alarm without interrupt handler and just wakeup via SEVONPEND?

While in theory the function `multicore_fifo_pop_timeout_us(timeout, *out)` looks workable, in practice it doesn't work as desired. Because the usage of `__wfe()` it doesn't respect it's given timeout. Since there is no call to `__sev()` on the other core the `__wfe()` is endless since there is no sev instruction executed. A solution would be to make it a busy wait. Don't know if SEVONPEND could help with this problem of some sort? Maybe set the timeout in an alarm without interrupt handler and just wakeup via SEVONPEND?
kilograham commented 2024-08-09 14:20:43 -05:00 (Migrated from github.com)

fixed

fixed
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#1142
No description provided.