From 1530c24cc75cdf9ba87c7e153ff28bf7beb4384c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 17 Aug 2014 20:57:16 -0700 Subject: [PATCH 1/1] cc1111: Wait for internal flash write to complete This ensures that we don't try to start another write too soon. Signed-off-by: Keith Packard --- src/cc1111/ao_intflash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cc1111/ao_intflash.c b/src/cc1111/ao_intflash.c index 632e2a85..eb3535c6 100644 --- a/src/cc1111/ao_intflash.c +++ b/src/cc1111/ao_intflash.c @@ -129,6 +129,8 @@ ao_intflash_write_aligned(uint16_t pos, __xdata void *d, uint16_t len) __reentra nop _endasm; } + __critical while (!ao_intflash_dma_done) + ao_sleep(&ao_intflash_dma_done); } static void -- 2.30.2