<?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>Error to initialize the sdcard (disk_initialize)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37902/error-to-initialize-the-sdcard-disk_initialize</link><description>Hi, 
 I am trying to insert the fatfs code example into my custom project. I already added all the files e dependences and when I call the fatfs_example function from main it works fine and I can to write into SDCARD. 
 I did it only to test the import</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Aug 2018 13:47:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37902/error-to-initialize-the-sdcard-disk_initialize" /><item><title>RE: Error to initialize the sdcard (disk_initialize)</title><link>https://devzone.nordicsemi.com/thread/146142?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 13:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b0d7c4e-523e-4f67-840c-23717a8f0a45</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;You can set a flag, then later handle the data in your main loop, but if you do not want to do this you can change the SPI interrupt priority:&lt;/p&gt;
&lt;p&gt;If you have copied most of the functions from example &amp;quot;fatfs&amp;quot;, then you can change sdk_config.h::SPI_DEFAULT_CONFIG_IRQ_PRIORITY to &amp;#39;6&amp;#39;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error to initialize the sdcard (disk_initialize)</title><link>https://devzone.nordicsemi.com/thread/146131?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 13:10:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a500d15-1b38-4586-9179-844d5075e066</guid><dc:creator>Renato Silva</dc:creator><description>&lt;p&gt;Hi Alseth,&lt;/p&gt;
&lt;p&gt;Unfortunally I cant change the function call to main context because I need to write into sdcard when the the firmware receive a bluetooth message.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Summing up, I have some develop boards and when one&amp;nbsp;board sends to another board, the board that received the bluetooth message must to save the message into sdcard.&lt;/p&gt;
&lt;p&gt;How I can change the priority these interrupts or how I how I can to do to discovery which interrpt is&amp;nbsp;&amp;nbsp;preventing the firmware to write into sdcard?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error to initialize the sdcard (disk_initialize)</title><link>https://devzone.nordicsemi.com/thread/146113?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 12:41:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1b78c0a-e84a-47c7-9c32-c0d4a9688091</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you calling this from an interrupt? If yes; then you are looping here because you&amp;#39;re waiting for another interrupt, configured with lower or equal priority as the one you&amp;#39;re in.&lt;/p&gt;
&lt;p&gt;Could you try scheduling the function call to main context instead?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>