From: Keith Packard Date: Wed, 27 Jul 2016 20:17:51 +0000 (-0700) Subject: altos: Don't access cc1120 SPI bus during recv after abort has started X-Git-Tag: 1.6.8~1^2~38 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=2507b9f29d25f77de249103805087a704069c625 altos: Don't access cc1120 SPI bus during recv after abort has started When the receive timeout happens, the radio may still interrupt while the SPI bus is getting shut down. If this happens, the interrupt handler shouldn't touch the SPI bus at all as it may well be turned off, which would cause the receive function to wedge waiting for a spi byte transfer to happen. Signed-off-by: Keith Packard --- diff --git a/src/drivers/ao_cc1120.c b/src/drivers/ao_cc1120.c index da5bbeba..f9fc6b2d 100644 --- a/src/drivers/ao_cc1120.c +++ b/src/drivers/ao_cc1120.c @@ -999,6 +999,8 @@ ao_radio_rx_isr(void) { uint8_t d; + if (ao_radio_abort) + return; if (rx_task_id) { if (ao_radio_try_select(rx_task_id)) { ++rx_fast_start;