From f0c05fddac5113352f3423b777a5f0398fdf59eb Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sat, 19 Mar 2016 23:05:51 +0100 Subject: [PATCH] nrf5x: hunting deadlock --- port/nrf5x/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/port/nrf5x/main.c b/port/nrf5x/main.c index ae5568998..801184ee3 100755 --- a/port/nrf5x/main.c +++ b/port/nrf5x/main.c @@ -267,6 +267,7 @@ void RADIO_IRQHandler(void){ // check if outgoing buffer available if (hci_outgoing_event_free){ + hci_outgoing_event_free = 0; int len = rx_adv_buffer[1] & 0x3f; hci_outgoing_event[0] = HCI_EVENT_LE_META; hci_outgoing_event[1] = 11 + len - 6; @@ -282,9 +283,9 @@ void RADIO_IRQHandler(void){ } else { // ... for now, we just throw the adv away and try to receive the next one } - // restart receiving - NRF_RADIO->TASKS_START = 1; } + // restart receiving + NRF_RADIO->TASKS_START = 1; } static uint8_t random_generator_next(void){