<?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>Enabling filesystem, disk and sdmmc makes system fail before any application code is called,</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115070/enabling-filesystem-disk-and-sdmmc-makes-system-fail-before-any-application-code-is-called</link><description>Hi, 
 I want to enabe filessytem, diskaccess and sdmmc on nrf5340 in order to save data on a SDCARD via SPI. 
 
 I have added the following to my proj.conf 
 
 CONFIG_DISK_ACCESS =y 
 CONFIG_DISK_DRIVERS =y 
 CONFIG_DISK_DRIVER_SDMMC =y 
 
 # Enable file</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Oct 2024 08:34:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115070/enabling-filesystem-disk-and-sdmmc-makes-system-fail-before-any-application-code-is-called" /><item><title>RE: Enabling filesystem, disk and sdmmc makes system fail before any application code is called,</title><link>https://devzone.nordicsemi.com/thread/506031?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2024 08:34:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4e4f8e5-ff07-43ca-aa8c-a26c40335196</guid><dc:creator>Kidmose</dc:creator><description>&lt;p&gt;Any news here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling filesystem, disk and sdmmc makes system fail before any application code is called,</title><link>https://devzone.nordicsemi.com/thread/504937?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2024 07:44:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e7f434a-6240-418e-91b9-bf912a8f6d4a</guid><dc:creator>Kidmose</dc:creator><description>&lt;p&gt;As described, i already did that - encountered this problem and isolated it to just enabling the defines. I have retried and i can init SD card and mount FS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However i debugged it a little further (in the scenario where my SDCARD is initialised and mounted)The problem arises when FS is enabled together with&amp;nbsp;&lt;span&gt;CONFIG_BT_SETTINGS&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_SETTINGS&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SETTINGS&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;and:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_DISK_ACCESS&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_FILE_SYSTEM&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_FAT_FILESYSTEM_ELM&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then the following chain of events plays out:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;br /&gt;bt_settings_init()&amp;nbsp;&lt;br /&gt;settings_subssy_init()&lt;br /&gt;settings_store_init()&lt;br /&gt;settings_backend_init(void) (in zephyr/subsys/settings/src/settings_file.c)&lt;br /&gt;settings_mount_file_backend()&lt;br /&gt;mkdir_if_not_exists()&lt;br /&gt;fs_mkdir() returns -2&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This apparently works when FS configs are not set.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling filesystem, disk and sdmmc makes system fail before any application code is called,</title><link>https://devzone.nordicsemi.com/thread/504496?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2024 09:31:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8f46d76-90c1-4ffa-9516-1e8bd908e85b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Maybe you could have a look at how it&amp;#39;s done in this&amp;nbsp;fs_sample ? There are overlays&amp;#39;&amp;nbsp; and config&amp;#39;s for the nRF52840, so you might need to create some for the nRF5340.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/subsys/fs/fs_sample"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/subsys/fs/fs_sample&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling filesystem, disk and sdmmc makes system fail before any application code is called,</title><link>https://devzone.nordicsemi.com/thread/504462?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2024 06:11:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2b85237-61e3-4592-9f86-e4d31d14847e</guid><dc:creator>Kidmose</dc:creator><description>&lt;p&gt;Hi, did you have a chance to take a look at it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling filesystem, disk and sdmmc makes system fail before any application code is called,</title><link>https://devzone.nordicsemi.com/thread/504176?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 12:40:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae6f0067-0f1b-48c6-823f-65270510e0eb</guid><dc:creator>Kidmose</dc:creator><description>&lt;p&gt;2.5.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling filesystem, disk and sdmmc makes system fail before any application code is called,</title><link>https://devzone.nordicsemi.com/thread/504175?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 12:38:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ada3bcbf-06b8-41b3-a2fd-67550470546c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;What version of nRF Connect SDK(NCS) are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>