Skip to content

Commit

Permalink
hal: Tock: Re-enable pin after detaching interrupt
Browse files Browse the repository at this point in the history
The Tock libtock_lora_phy_gpio_disable_interrupt() syscall will disable
interrupts for the pin, but also put the pin into a disabled low power
state. This isn't what RadioLib expects and casues subsequent LoRaWAN
transfers to fail [1].

So after we disable interrupts and send the pin to low power let's
re-enable inputs as RadioLib expects.

1: #1303

Signed-off-by: Alistair Francis <[email protected]>
  • Loading branch information
alistair23 committed Nov 2, 2024
1 parent e9dd3dc commit 532b22b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hal/Tock/libtockHal.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class TockHal : public RadioLibHal {

gpio_funcs[interruptNum - 1] = NULL;
libtock_lora_phy_gpio_disable_interrupt(interruptNum);
libtock_lora_phy_gpio_enable_input(interruptNum, libtock_pull_down);
}

void delay(unsigned long ms) override {
Expand Down

0 comments on commit 532b22b

Please sign in to comment.