1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/sy127x: clear interrupts for DIO3

If ValidHeader interrupt is set, it triggers DIO3 interrupt. However, if DIO3 line is not connected, ValidHeader interrupt is still set in RegIrqFlags register when RxDone interrupt is triggered on DIO0. It sets the mode back to idle. Therefore, the _on_dio3_irq does not clear the ValidHeader interrupt flag.
This commit is contained in:
Gunar Schorcht 2020-03-10 10:47:36 +01:00
parent 56040e3369
commit 87021a0b18

View File

@ -721,6 +721,11 @@ void _on_dio3_irq(void *arg)
break;
default:
DEBUG("[sx127x] netdev: sx127x_on_dio3: unknown state");
/* at least the related interrupts should be cleared in this case */
sx127x_reg_write(dev, SX127X_REG_LR_IRQFLAGS,
SX127X_RF_LORA_IRQFLAGS_VALIDHEADER |
SX127X_RF_LORA_IRQFLAGS_CADDETECTED |
SX127X_RF_LORA_IRQFLAGS_CADDONE);
break;
}
}