<?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>LittleFS on external spi flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110760/littlefs-on-external-spi-flash</link><description>I am trying to format an external flash chip with littlefs, but keep getting an MPU fault. I can erase the chip, but not mount or format. I have tried writing and reading to the chip using flash_area_read/write at different areas in the chip and it goes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Mar 2025 01:58:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110760/littlefs-on-external-spi-flash" /><item><title>RE: LittleFS on external spi flash</title><link>https://devzone.nordicsemi.com/thread/528103?ContentTypeID=1</link><pubDate>Thu, 20 Mar 2025 01:58:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b19fd8a6-47df-46b0-a272-aeabafd23641</guid><dc:creator>daThinkingOne</dc:creator><description>&lt;p&gt;I increased it to 4096.&amp;nbsp; Try that and if it doesn&amp;#39;t work, just increase it by 100 until it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LittleFS on external spi flash</title><link>https://devzone.nordicsemi.com/thread/527444?ContentTypeID=1</link><pubDate>Fri, 14 Mar 2025 21:25:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b12c6e2e-74d9-4676-9263-4cc54678cade</guid><dc:creator>patratacus</dc:creator><description>&lt;p&gt;What did you increase the config_main_stack_size to? Since you are using a 32 MBit NAND here, are you setting it to just the 15-bit integer value (32,768) as shown in the other thread?&amp;nbsp; I have a 2 GBit NAND so should I keep the same value?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LittleFS on external spi flash</title><link>https://devzone.nordicsemi.com/thread/481659?ContentTypeID=1</link><pubDate>Fri, 03 May 2024 02:42:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1fa3cca-c929-4bed-b8b7-fdea576d6e91</guid><dc:creator>daThinkingOne</dc:creator><description>&lt;p&gt;Yes, that worked.&amp;nbsp; I should have read it a bit more.&amp;nbsp; It&amp;#39;s hard to imagine that the file system uses that many function calls.&amp;nbsp; Is there other things that get stored on the stack?&amp;nbsp; Anyway to optimize it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LittleFS on external spi flash</title><link>https://devzone.nordicsemi.com/thread/481448?ContentTypeID=1</link><pubDate>Thu, 02 May 2024 07:15:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9751e591-a54d-46fa-9ff1-170afa1867c0</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Focusing on the below lines&lt;/p&gt;
&lt;p&gt;[00:00:25.721,801] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0&lt;br /&gt;[00:00:25.721,832] &amp;lt;err&amp;gt; os: Current thread: 0x200009c0 (main)&lt;/p&gt;
&lt;p&gt;It looks like you do not have enough stack allocated for this for the main thread.&lt;/p&gt;
&lt;p&gt;You need to increase the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.99-dev1/kconfig/CONFIG_MAIN_STACK_SIZE.html#cmdoption-arg-CONFIG_MAIN_STACK_SIZE"&gt;config_main_stack_size &lt;/a&gt;value in your prj.conf as mentioned in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/109643/flash-overflow/481252"&gt;this &lt;/a&gt;thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>