<?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>SD card initialization failure sometimes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69244/sd-card-initialization-failure-sometimes</link><description>I&amp;#39;m designing a EEPROM type of memory using a SDCard. The write and read functions works fine, but the initialization does not work sometimes and it stays in a loop (because of the way the event handler is working). I&amp;#39;m using the 12.3 version of the SDK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Dec 2020 14:11:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69244/sd-card-initialization-failure-sometimes" /><item><title>RE: SD card initialization failure sometimes</title><link>https://devzone.nordicsemi.com/thread/284103?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 14:11:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47317edd-7869-45c2-8df2-e7a3b129fc69</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]The write and read functions works fine, but the initialization does not work sometimes and it stays in a loop (because of the way the event handler is working).[/quote]
&lt;p&gt;I too would suspect it to be due to the way the event handler is set up.&lt;br /&gt;I notice that you are never checking the returned error code of the&amp;nbsp;&lt;em&gt;app_sdc_init&amp;nbsp;&lt;/em&gt;call. Could you please make sure to pass the returned error code to an APP_ERROR_CHECK?&lt;br /&gt;You should always check the returned error codes, since you will not know that the function has failed unless you do.&lt;br /&gt;&lt;br /&gt;Please also make sure that you have DEBUG enabled in your preprocessor defines, like shown in the included image:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4555.enabling_5F00_debug_5F00_SES.PNG" /&gt;&amp;nbsp;&lt;br /&gt;This will make a more detailed debug message be written to your log when an APP_ERROR_MESSAGE is passed a non-NRF_SUCCESS error code.&lt;br /&gt;&lt;br /&gt;Please do this, and let me know what is written to the logger when the initialization fails.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>