Skip to content

Commit 9ec4762

Browse files
Disable IRQs on RP2040 during HW division
The divider is a shared HW resource, and when an IRQ comes in (i.e. when a packet is processed by LWIP and the user's callbacks) its state can be corrupted silently and randomly. Change the Pico-SDK defaults to disable IRQs during division operations, avoiding the issue by disallowing the LWIP callback to happen until after division is completed. Fixes #3212
1 parent 14aef19 commit 9ec4762

File tree

11 files changed

+3
-0
lines changed

11 files changed

+3
-0
lines changed

lib/platform_def.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
-DPICO_USE_BLOCKED_RAM=0
7272
-DPICO_XOSC_STARTUP_DELAY_MULTIPLIER=64
7373
-DPICO_MAX_SHARED_IRQ_HANDLERS=6
74+
-DPICO_DIVIDER_DISABLE_INTERRUPTS=1
7475

7576
-DPICO_CYW43_ARCH_HEADER=stdint.h
7677
-DCYW43_TASK_STACK_SIZE=1024

lib/rp2040/liblwip-bt.a

0 Bytes
Binary file not shown.

lib/rp2040/liblwip.a

0 Bytes
Binary file not shown.

lib/rp2040/libpico.a

-628 Bytes
Binary file not shown.

lib/rp2350-riscv/liblwip-bt.a

0 Bytes
Binary file not shown.

lib/rp2350-riscv/liblwip.a

0 Bytes
Binary file not shown.

lib/rp2350-riscv/libpico.a

0 Bytes
Binary file not shown.

lib/rp2350/liblwip-bt.a

0 Bytes
Binary file not shown.

lib/rp2350/liblwip.a

0 Bytes
Binary file not shown.

lib/rp2350/libpico.a

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)