<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>formatting an uSDcard from ext4 to fat32</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20748/formatting-an-usdcard-from-ext4-to-fat32</link><description>Hi,
I have a problem that when formatting an uSDcard from ext4 to fat32 it gets with both file systems. 
 
 In my code I use the FAT FS library [http://elm-chan.org/fsw/ff/00index_e.html] and the nordic 12.2.0 SDK [http://infocenter.nordicsemi.com</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Mar 2017 09:37:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20748/formatting-an-usdcard-from-ext4-to-fat32" /><item><title>RE: formatting an uSDcard from ext4 to fat32</title><link>https://devzone.nordicsemi.com/thread/80975?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2017 09:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9baaac91-dff0-43b5-b64c-5e5cc2434db1</guid><dc:creator>ubirajara</dc:creator><description>&lt;p&gt;Hi,
I was unaware of this difference between fat32 and ext4.
The explanation makes sense but I do not understand why with gparted if you do new-&amp;gt; Partition-&amp;gt; Ext4 and run my code I can create a partition with only the fat32 file system and if I already have a partition with fat32 file system created by me and select it and make fotmat to-&amp;gt; ext4 and then run my code I get both file systems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: formatting an uSDcard from ext4 to fat32</title><link>https://devzone.nordicsemi.com/thread/80974?ContentTypeID=1</link><pubDate>Sat, 25 Mar 2017 21:11:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b82dca47-e6d5-492a-a9dc-3a649ac735b6</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;That behavirour is actually expected, especially when one considers how ext4 and fat32 organize their metatdata.&lt;/p&gt;
&lt;p&gt;FAT32 has &lt;em&gt;all&lt;/em&gt; the metadata at the beginning of the partition, except for directory entries. This also means that when formatting only the first part is actually written to, other data would simply stay as it is.&lt;/p&gt;
&lt;p&gt;Ext{2,3,4} keeps a number of &amp;quot;superblock&amp;quot; backups scattered across the entire partition. These won&amp;#39;t be overwritten.&lt;/p&gt;
&lt;p&gt;Now &lt;code&gt;mount&lt;/code&gt; will find both ext4 superblocks and fat32 boot sector - and thus fail.&lt;/p&gt;
&lt;p&gt;One could erase or overwrite the additional superblocks before formatting fat32 - the &lt;code&gt;mkfs.ext4&lt;/code&gt; command prints out those.&lt;/p&gt;
&lt;p&gt;Another solution would be to use the dedicated SD erase commands (CMD32, CMD33, CMD38) to erase the entire fat32 partition before formatting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: formatting an uSDcard from ext4 to fat32</title><link>https://devzone.nordicsemi.com/thread/80973?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 14:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:010c2315-493d-41a5-94d2-23ec02be4c9b</guid><dc:creator>ubirajara</dc:creator><description>&lt;p&gt;I already searched and I did not find any open issues with this problem.
In the forum also I did not find any issue related to this.
I tried on the nRF52832 with microSD breakout board from adafruit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: formatting an uSDcard from ext4 to fat32</title><link>https://devzone.nordicsemi.com/thread/80972?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 13:49:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc69101f-36e9-413e-96dc-b818c296ce71</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This sounds like a very specific and less common use-case. It could sound like a bug/issue in FatFs, more than a MCU specific issue. Have you tried looking in the documentation of FatFs, to see if it mentions anything about such cases?&lt;/p&gt;
&lt;p&gt;I also see that there is a &lt;a href="http://elm-chan.org/fsw/ff/bd/"&gt;user forum on the FatFs site&lt;/a&gt;, maybe someone there can shed some light on what might be causing this behaviour?&lt;/p&gt;
&lt;p&gt;Also, which device did you try this on (nRF51/nRF52832/nRF52840)? I could try to replicate your issue with one of my devices, if I can get hold of a microSD connector.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>