mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-24 11:34:53 +00:00
Disable the watchdog during the whole erase operation.
This commit is contained in:
parent
a4d5ca833c
commit
6005437b27
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)$Id: xmem.c,v 1.4 2008/01/21 10:28:44 nvt-se Exp $
|
* @(#)$Id: xmem.c,v 1.5 2008/01/21 10:40:26 nvt-se Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -251,11 +251,14 @@ xmem_erase(long size, off_t addr)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watchdog_stop();
|
||||||
|
|
||||||
for (; addr < end; addr += XMEM_ERASE_UNIT_SIZE) {
|
for (; addr < end; addr += XMEM_ERASE_UNIT_SIZE) {
|
||||||
watchdog_periodic();
|
|
||||||
erase_sector(addr);
|
erase_sector(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watchdog_start();
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user