# Reset/Format Filesystem

**URL:** <https://forums.digi.com/t/reset-format-filesystem/5104>\
**Category:** NET+OS\
**Created:** [August 22, 2006, 1:25pm UTC](https://forums.digi.com/t/reset-format-filesystem/5104 "2006-08-22T13:25:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank1](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@Frank1](https://forums.digi.com/u/Frank1)\
**Post date:** [August 22, 2006, 1:25pm UTC](https://forums.digi.com/t/reset-format-filesystem/5104/1 "2006-08-22T13:25:29Z")

</div>

Hello,  
I use the connectme with flash file system.  
Now i have create a corrupt file and i cant delete it.  
when i want to delete this file with the command “NAFSdelete\_file” i became the error code -4 “NAFS\_BLOCK\_NOT\_MAPPED”.  
What can i do to correct the filesystem?

thx,  
Frank

---

<div class="post-metadata">

**Author:** ![tmaltesen](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@tmaltesen](https://forums.digi.com/u/tmaltesen)\
**Post date:** [September 1, 2006, 9:06am UTC](https://forums.digi.com/t/reset-format-filesystem/5104/2 "2006-09-01T09:06:52Z")

</div>

I previously had this problem and got a number of field failure because flash files system got corrupted.

I have solved it by changed the initialization of the flash disk. This is done in BSP.H where you add the flag NAFS\_ENABLE\_POWER\_LOSS\_RECOVERY to the BSP\_NATIVE\_FS\_FLASH0\_OPTIONS options. If flash0 is corruption you need to do a reset that reinitializes the file system. During inititialization the corruption is fixed.

Best regards,  
Thomas Maltesen
