<?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>NRF5340 audio DK:can&amp;#39;t use sd card</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100746/nrf5340-audio-dk-can-t-use-sd-card</link><description>I want to use sd card to read audio on nrf5340 audio application. 
 but it gets stuck at the log. 
 
 I found the location of the problem by troubleshooting. 
 
 the hfclock_config_and_start() 
 
 if run nrfx_clock_divider_set(),we will don&amp;#39;t user the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Oct 2023 14:09:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100746/nrf5340-audio-dk-can-t-use-sd-card" /><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/450878?ContentTypeID=1</link><pubDate>Tue, 17 Oct 2023 14:09:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec517a31-3f48-4a2b-9e2c-a7e44ae9058f</guid><dc:creator>uzer123</dc:creator><description>&lt;p&gt;With NCS v2.4.2 the instructions found here didn&amp;#39;t work for me. Also&amp;nbsp;&lt;a href="https://github.com/too1/ncs-le-audio-sd-card-playback"&gt;https://github.com/too1/ncs-le-audio-sd-card-playback&lt;/a&gt;&amp;nbsp;as other mentioned is for older NCS version.&amp;nbsp;What i found to do the job (with the nRF5340 AUDIO DK example as it comes with v2.4.2) is:&lt;/p&gt;
&lt;p&gt;1) at prj.conf add:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_MAIN_STACK_SIZE=4096&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) no need to change anything in main. Just add sd_card_list_files(&amp;quot;/&amp;quot;); after sd_card_init(); if you want to test your sd.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/442226?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 08:21:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d53a219c-d949-4e4f-b4d6-9a7c8f92a011</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Ok, thanks for clarifying. Our team informs me that this seems to an issue from the Zephyr repository&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/56030"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/56030&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/442078?ContentTypeID=1</link><pubDate>Fri, 18 Aug 2023 12:03:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a48cb2d-f760-4c61-81ff-9ebfaa5cd3ce</guid><dc:creator>Karolina Sebestova</dc:creator><description>&lt;p&gt;No, I need to increase the main stacks size for it to work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/442008?ContentTypeID=1</link><pubDate>Fri, 18 Aug 2023 07:06:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e738655-d011-4b76-856e-52db9fdec662</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="Karolina Sebestova"]It does work in newer versions though (2.4+)[/quote]
&lt;p&gt;To clarify, does using the SD card work in v2.4.x work as expected?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/441920?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 15:25:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f2708c3-4319-422e-bcfd-536ae912218c</guid><dc:creator>Karolina Sebestova</dc:creator><description>&lt;p&gt;Hello. Thanks.&lt;br /&gt;&lt;br /&gt;However, increasing the main stack size does not help. I&amp;#39;m working with NCS 2.3.0, my current project requires it. It does work in newer versions though (2.4+)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/441802?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 09:27:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c738304e-1bc7-41fd-b623-59cea653af41</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/karolina-sebestova"&gt;Karolina Sebestova&lt;/a&gt;&amp;nbsp;could you please try extending the main stack size: CONFIG_MAIN_STACK_SIZE=1800 and see what the results are?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/441033?ContentTypeID=1</link><pubDate>Sat, 12 Aug 2023 09:21:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b589496-979a-4212-b3a0-1302415e1939</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;True, but I spent a lot of time and still can&amp;#39;t figure it out. I ended up hardcoding the test in the code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/440960?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2023 12:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61f92d44-dcdb-44e1-b6bc-370ae94a926d</guid><dc:creator>Karolina Sebestova</dc:creator><description>&lt;p&gt;Hello. Can this be solved in any way? I am experiencing the same exact issue. The app crashes if an SD card is inserted in the devkit. Commenting out&amp;nbsp;&lt;span&gt;hfclock_config_and_start&lt;/span&gt;&lt;span&gt;() may help, however it makes the application core run at only 64MHz instead of 128MHz which seems to be too slow for audio playback.This seems to be a bug in the nRF5340 Audio Application.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/431582?ContentTypeID=1</link><pubDate>Sat, 17 Jun 2023 02:18:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca78c7b3-d0ac-4023-b5f6-3c1fd4066ed6</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;嗨卡罗琳娜，&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;你是对的，但是如果使用这个方案（先运行sd_card_init（）），仍然无法运行sd卡&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;功能&lt;/span&gt;&lt;/span&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;（读或写）。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;如果以 64Mhz 运行，它会使我的音频&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;非常糟糕（使用 i2s 播放）。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/431554?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2023 16:00:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:695eaac9-12bf-46d2-9cf6-9f9b189f2220</guid><dc:creator>Karolina Sebestova</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I am experiencing the same issue. If insert an SD card into the gateway device and simply run the nRF5340 Audio application out of the box, the execution of the program gets stuck after initialization of the SD card by &lt;code&gt;sd_card_init()&lt;/code&gt;. Without an SD card inserted the application behaves as expected. So far my workaround has been to initialize the SD card before calling the&amp;nbsp;&lt;code&gt;&lt;span&gt;hfclock_config_and_start&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;()&lt;/code&gt; function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void main(void)
{
	int ret;

	LOG_DBG(&amp;quot;nRF5340 APP core started&amp;quot;);

	// SD card has to be initialized prior to calling hfclock_config_and_start()
	ret = board_version_valid_check();
	ERR_CHK(ret);

	ret = board_version_get(&amp;amp;board_rev);
	ERR_CHK(ret);

	if (board_rev.mask &amp;amp; BOARD_VERSION_VALID_MSK_SD_CARD) {
		ret = sd_card_init();
		if (ret != -ENODEV) {
			ERR_CHK(ret);
		}
	}

	ret = hfclock_config_and_start();
	ERR_CHK(ret);

	ret = led_init();
	ERR_CHK(ret);

	ret = button_handler_init();
	ERR_CHK(ret);

	channel_assignment_init();

	ret = channel_assign_check();
	ERR_CHK(ret);

	ret = fw_info_app_print();
	ERR_CHK(ret);

	// ret = board_version_valid_check();
	// ERR_CHK(ret);

	// ret = board_version_get(&amp;amp;board_rev);
	// ERR_CHK(ret);

	// if (board_rev.mask &amp;amp; BOARD_VERSION_VALID_MSK_SD_CARD) {
	// 	ret = sd_card_init();
	// 	if (ret != -ENODEV) {
	// 		ERR_CHK(ret);
	// 	}
	// }

#if defined(CONFIG_AUDIO_DFU_ENABLE)
	/* Check DFU BTN before Initialize BLE */
	dfu_entry_check();
#endif

	/* Initialize BLE, with callback for when BLE is ready */
	ret = ble_core_init(on_ble_core_ready);
	ERR_CHK(ret);

	/* Wait until ble_core/NET core is ready */
	while (!(bool)atomic_get(&amp;amp;ble_core_is_ready)) {
		(void)k_sleep(K_MSEC(100));
	}

	ret = leds_set();
	ERR_CHK(ret);

	audio_system_init();

	ret = streamctrl_start();
	ERR_CHK(ret);

	while (1) {
		streamctrl_event_handler();
		STACK_USAGE_PRINT(&amp;quot;main&amp;quot;, &amp;amp;z_main_thread);
	}
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simply commenting &lt;code&gt;hfclock_config_and_start&lt;/code&gt;&lt;code&gt;()&lt;/code&gt; out also works, but I believe it makes the application core run at 64MHz as opposed to 128MHz.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karolina&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/431200?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 09:36:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:498782a4-a579-49e3-b725-ce304707cf92</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;Hi,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;like you said，if i run &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;nrfx_clock_divider_set ，&amp;nbsp;&lt;/span&gt;&lt;/span&gt;the device is not moving on to later function calls.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I comment out this, everything is normal, and the content I want will be output later.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/431159?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 07:43:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c918f04-b216-4e45-89ff-7304d13e3242</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;The logs looks correct to me - could you elaborate on what you mean when you say that the device gets stuck after this?&lt;br /&gt;Have you tried to debug the application, and see that the device is not moving on to later function calls, or is it just the logs that stop updating?&lt;br /&gt;&lt;br /&gt;Could you also elaborate on what you mean when you say that &amp;#39;if you perform the SD card operation before the&amp;nbsp;&lt;span&gt;nrfx_clock_divider_set call everything will work - in this case, do you not get stuck at all, and the SD card functions as expected?&lt;/span&gt;&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><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/430868?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 03:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f2e7c20-388f-4bfa-aeac-bbad28f02379</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;I delete the config&amp;nbsp;&lt;span&gt;CONFIG_SD_LOG_LEVEL_OFF&lt;/span&gt;&lt;span&gt;=y.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have some new outut.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; GW [00:00:02.417,266] &amp;lt;inf&amp;gt; sd: Detected SD card
00&amp;gt; GW [00:00:02.436,157] &amp;lt;inf&amp;gt; sd: Maximum SD clock is under 25MHz, using clock of 8000000Hz
00&amp;gt; GW [00:00:02.436,767] &amp;lt;inf&amp;gt; sd_card: SD card volume size: 7618 MB&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/430866?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 02:56:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c18117e7-a921-47ab-9d81-55f6e0f42aeb</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;hi,Karl.&lt;/p&gt;
&lt;p&gt;I tried using the github demo directly,It have the same problem.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; HL [00:00:00.376,434] &amp;lt;inf&amp;gt; fw_info: ------- DEBUG BUILD -------
00&amp;gt; HL [00:00:00.376,434] &amp;lt;inf&amp;gt; fw_info: HEADSET left device
00&amp;gt; HL [00:00:00.387,054] &amp;lt;inf&amp;gt; board_version: Compatible board/HW version found: 1.0.0
00&amp;gt; HL [00:00:02.421,569] &amp;lt;inf&amp;gt; sd_card: SD card volume size: 7618 MB&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The app is stuck at this segment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/430858?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 01:38:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:309174fe-440b-4e9e-a16a-211f070f253e</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;I making modifications to the nRF5340 Audio DK to match the modifications made in the referenced sample，the github demo is old ncs version，I will try to fix it and run it, please wait for my results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 audio DK:can't use sd card</title><link>https://devzone.nordicsemi.com/thread/430796?ContentTypeID=1</link><pubDate>Tue, 13 Jun 2023 14:12:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b2396b6-e866-43cd-9c2e-2ba5c93b0067</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]I want to use sd card to read audio on nrf5340 audio application.[/quote][quote user=""]Why is this so, I found a sample(&lt;a href="https://github.com/too1/ncs-le-audio-sd-card-playback"&gt;https://github.com/too1/ncs-le-audio-sd-card-playback&lt;/a&gt;), he also performed the same operation, this is the normal process of 5340audio demo, why do I have such a problem？[/quote]
&lt;p&gt;Are you running the sample from the github page directly, or are you making modifications to the nRF5340 Audio DK to match the modifications made in the referenced sample, and this is where the issue occurs?&lt;br /&gt;If so, have you tried running the sample from the github without modification? -what were the results then?&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>