Skip to content

Commit

Permalink
Freertos background asserts if IPv6 is enabled (#1591)
Browse files Browse the repository at this point in the history
If LWIP_IPV6=1 a request to update the multicast list occurs in a
callback in the low priority interrupt.

This makes an ioctl call into the driver, at the end of which is a call
to cyw43_await_background_or_timeout_us (see CYW43_DO_IOCTL_WAIT).
It is attempting to delay until there's "some work to do".

For Freertos this fails an assertion as an attempt is made to acquire a
semaphore in interrupt context.

Fixes #1590
  • Loading branch information
peterharperuk authored Dec 21, 2023
1 parent 9ff8a98 commit 9f45e3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rp2_common/pico_cyw43_driver/cyw43_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ void cyw43_thread_lock_check(void) {
#endif

void cyw43_await_background_or_timeout_us(uint32_t timeout_us) {
if (__get_current_exception() > 0) {
async_context_wait_until(cyw43_async_context, make_timeout_time_us(timeout_us));
return;
}
async_context_wait_for_work_until(cyw43_async_context, make_timeout_time_us(timeout_us));
}

Expand Down

0 comments on commit 9f45e3c

Please sign in to comment.