diff options
author | Nick Foster <nick@ettus.com> | 2011-08-09 13:59:32 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-08-09 17:49:43 -0700 |
commit | a2ff19e38282e8ad641b9bbabbb07af315864548 (patch) | |
tree | d4c696f1d5e44857055f9be1af2783646a2f7dc2 /firmware/zpu/usrp2p/spi_flash.c | |
parent | d44279498462911c7ea698ac5924da6025f2112a (diff) | |
download | uhd-a2ff19e38282e8ad641b9bbabbb07af315864548.tar.gz uhd-a2ff19e38282e8ad641b9bbabbb07af315864548.tar.bz2 uhd-a2ff19e38282e8ad641b9bbabbb07af315864548.zip |
N2XX: fix bug in firmware updater (don't use local variables for static data). this fixes the "n210 bricking on update while streaming" bug.
Diffstat (limited to 'firmware/zpu/usrp2p/spi_flash.c')
-rw-r--r-- | firmware/zpu/usrp2p/spi_flash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/zpu/usrp2p/spi_flash.c b/firmware/zpu/usrp2p/spi_flash.c index 2033b8035..9406f8042 100644 --- a/firmware/zpu/usrp2p/spi_flash.c +++ b/firmware/zpu/usrp2p/spi_flash.c @@ -50,7 +50,7 @@ spi_flash_wait(void) void spi_flash_erase_sector_start(uint32_t flash_addr) { - //uprintf(UART_DEBUG, "spi_flash_erase_sector_start: addr = 0x%x\n", flash_addr); + //printf("spi_flash_erase_sector_start: addr = 0x%x\n", flash_addr); if(flash_addr > spi_flash_memory_size()) return; @@ -166,6 +166,9 @@ void spi_flash_async_erase_start(spi_flash_async_state_t *s, uint32_t flash_addr, size_t nbytes) { + + //printf("got command to erase %d bytes at 0x%x\n", nbytes, flash_addr); + if ((nbytes == 0) || ((flash_addr + nbytes) > spi_flash_memory_size())){ s->first = s->last = s->current = 0; return; |