<?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>Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81480/failure-to-get-sdhc-to-work-with-nrf5340dk</link><description>Hello, 
 I started my prototyping with the 52840DK and the SD Card was working fine. However, with the 5340 dev kit, I cannot get the SPI to work and access the SD Card properly. 
 I am getting the error : 
 00&amp;gt; *** Booting Zephyr OS build v2.6.99-ncs1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Dec 2021 01:52:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81480/failure-to-get-sdhc-to-work-with-nrf5340dk" /><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/341423?ContentTypeID=1</link><pubDate>Wed, 01 Dec 2021 01:52:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5353702-9579-464b-bc83-2474061db11a</guid><dc:creator>code-magic</dc:creator><description>&lt;p&gt;&lt;span&gt;The issue for me turned out being the SPI Max Frequency setting. The max I was able to get this card/module combo to support is 15900000. I am able to mount the FS now on the SD card. If&amp;nbsp;15900000 does not work try a lower frequency.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/340789?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 15:53:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80c707b7-a52e-49b3-abd8-9cfc1f016863</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;The pins you reference does have some other uses so there could be a conflict. You can see in the docs here:&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/connector_if.html?cp=3_0_4_3_5"&gt;https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/connector_if.html?cp=3_0_4_3_5&lt;/a&gt;&amp;nbsp;and here&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/hw_external_memory.html?cp=3_0_4_3_4"&gt;https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/hw_external_memory.html?cp=3_0_4_3_4&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The external memory does occupy some of the pins.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Disable spi4 and then use the spi4 pins in sted should&amp;nbsp;&amp;quot;easier&amp;quot; since they are not used for anything else.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Are you using spi3 for something else? or could that be an option to try.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/340738?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 13:08:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7009e2a2-f052-407b-b6aa-1f6e6c877144</guid><dc:creator>code-magic</dc:creator><description>&lt;p&gt;I&amp;#39;m experiencing the exact same error with the same board and I have qspi commented out and went over the common dts file to ensure the pins are not being used anywhere else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/340541?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 13:02:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30468fc0-0566-4146-9d2f-22838ba52467</guid><dc:creator>thesparkness</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I get exactly the same error with other pins (15, 16, 17) and (8, 9, 10)-&amp;gt; with qspi disabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/340261?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2021 08:36:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd48d6fa-aae6-4a94-9744-3030ad1f15c2</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;the &amp;quot;&lt;span&gt;&amp;nbsp;&amp;lt;err&amp;gt; fs: fs mount error (-5)&amp;quot; error is an I/O error. The&amp;nbsp;netcore&amp;nbsp;has uart0 with pin 33, try to use &lt;span style="font-size:12px;"&gt;something&lt;/span&gt;&amp;nbsp;else or edit the&amp;nbsp;nrf5340_cpunet_reset.c directly.&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1637656445700v1.jpeg" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;Try to use some other pins and see if you get same error.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/340156?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 15:23:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86ba108a-84e0-4428-9c4a-e0ff52fc9d56</guid><dc:creator>thesparkness</dc:creator><description>&lt;p&gt;Hello Jonathan,&lt;/p&gt;
&lt;p&gt;I started with the non secure and switched with the secured one but have the same results in the two cases&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/340148?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 15:12:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e22cdb24-05d9-4a63-977f-8ead79eee9a8</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Did you build for secure or non secure?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/340008?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 10:30:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30863fff-7586-4e68-860f-3fac7650bf83</guid><dc:creator>thesparkness</dc:creator><description>&lt;p&gt;Maybe someone from Nordic could help us with the SDHC&amp;nbsp;of the NRF5340 ? I have no other idea&amp;hellip;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/338854?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 17:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7784650-4d29-425d-8edd-4669d8dbea9d</guid><dc:creator>code-magic</dc:creator><description>&lt;p&gt;Here&amp;#39;s my output from the logic analyzer after I found I had the analyzer hooked up wrong. Also, my project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/fat_5F00_fs_5F00_171.zip"&gt;devzone.nordicsemi.com/.../fat_5F00_fs_5F00_171.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5305.log-output.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636736679218v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/338813?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 13:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0f91af4-85fe-48bf-8054-06c38c646fe9</guid><dc:creator>thesparkness</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1636724254975v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;With the logic analyser, I can see this weird SPI&amp;nbsp;behaviour on the SD Card...&lt;/p&gt;
&lt;p&gt;CS is down.SCK (14) is beating. MOSI and MISO are down.&lt;/p&gt;
&lt;p&gt;I cannot get why SPI is&amp;nbsp;different on the nrf5340 versus the nrf52 series?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/338271?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 01:43:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc550836-1ca2-4e9f-b79c-9ee9233e99c9</guid><dc:creator>code-magic</dc:creator><description>&lt;p&gt;Debugging this in Segger I see the problem at disck_access.c in diskaccess_get_di(). The loic with&amp;nbsp;&lt;span class="pl-c1"&gt;SYS_DLIST_FOR_EACH_NODE&lt;/span&gt;&lt;span&gt;(&amp;amp;disk_access_list, node){ } is skipped because disk_access_list has nothing in it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It appears disk_access_list is not being populated inside&amp;nbsp;disk_access_register(). I set a breakpoint at the beginning of the function, but it&amp;#39;s not being hit.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here is the line of code:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/subsys/disk/disk_access.c#L33"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/subsys/disk/disk_access.c#L33&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;Here is the value of disk_access_list &amp;amp; disk at the end of&amp;nbsp;disk_access_get_di():&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636508411679v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Side note: &amp;quot;SD&amp;quot; is passed into diskacces_git_di().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/338249?ContentTypeID=1</link><pubDate>Tue, 09 Nov 2021 17:34:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a60dfee9-9db2-44e8-bc52-b81f5e2fe5d3</guid><dc:creator>thesparkness</dc:creator><description>[quote userid="108349" url="~/f/nordic-q-a/81480/failure-to-get-sdhc-to-work-with-nrf5340dk/338032#338032"]My overlay looks very close to yours with the exception of my pin definitions.&amp;nbsp;Why do you not have cs-gpios set to&amp;nbsp;GPIO_ACTIVE_HIGH like what is in the sample? I tried both ACTIVE_LOW and ACTIVE_HIGH with the same result.[/quote]
&lt;p&gt;I tried both as well without success as I found&amp;nbsp;both online.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to get SDHC to work with NRF5340DK</title><link>https://devzone.nordicsemi.com/thread/338032?ContentTypeID=1</link><pubDate>Tue, 09 Nov 2021 01:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:951188fa-6ce3-4eb0-a529-c27bf5ee3258</guid><dc:creator>code-magic</dc:creator><description>&lt;p&gt;I am working through this same exact error on the same board and same Zephyr version.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My overlay looks very close to yours with the exception of my pin definitions.&amp;nbsp;Why do you not have cs-gpios set to&amp;nbsp;GPIO_ACTIVE_HIGH like what is in the sample? I tried both ACTIVE_LOW and ACTIVE_HIGH with the same result.&lt;/p&gt;
&lt;p&gt;My SD card is formatted FAT and is a 32GB SDHC.&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;I hooked all pins up to a logic analyzer and both MOSI and SCK go high on boot/reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636421359081v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the project on github:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/subsys/fs/fat_fs"&gt;github.com/.../fat_fs&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>