<?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>Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125443/slow-usb-msc-transfer-speed-on-nrf5340-with-sd-card</link><description>In our design, we wired the SD card in SPI mode on SPI bus 4 wich a maximum SPI frequency of 50 MHz or 25 MHz as these are supported by the SD card. We used FAT32 file system, but later enabled support for exFAT and formated the SD card with exFAT. For</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Nov 2025 12:42:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125443/slow-usb-msc-transfer-speed-on-nrf5340-with-sd-card" /><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/554524?ContentTypeID=1</link><pubDate>Mon, 17 Nov 2025 12:42:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9a48bc0-791a-48d7-914a-d588348df2f8</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Shuhao Dong"]Please suggest if SD card in SPI mode with this speed is the expected behaviour.[/quote]
&lt;p&gt;Obtained values for transfer speed seem to be quite right in terms of what should be achievable.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/554104?ContentTypeID=1</link><pubDate>Wed, 12 Nov 2025 11:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57de8289-29e9-4920-9819-7c682b129e71</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;Hi, I have tried to disable logging, and the speed is doubled: a 10 MB file takes 54 seconds to finish copy, that is effectively 192 kB/s. Not as fast as the previous post, but I think this is due to the QSPI flash in the post vs SPI flash in my design. Please suggest if SD card in SPI mode with this speed is the expected behaviour. Many thanks.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553982?ContentTypeID=1</link><pubDate>Tue, 11 Nov 2025 13:36:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b35eeec-a388-4043-8adf-d523eff17141</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Have you observed speed difference when transferring small vs large files?&lt;/p&gt;
[quote user="dejans"]Have you tried to test when logging is disabled? What is the result?[/quote]
&lt;p&gt;Have you tried to disable logging?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553966?ContentTypeID=1</link><pubDate>Tue, 11 Nov 2025 12:23:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:743f9443-f666-4bdf-bcee-7e8aadabf84a</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;I used MacOS as host machine. I have a single 10.5 MB binary file in the SD card, I copy the file and start counting time then a simple divide. Transfer speed is very similar with FAT32 and exFAT. The only difference I can observe from exFAT is increased stability. When we use FAT32 at the beginning, copying large files like 10 MB will sometime trigger an automatic ejection of SD card from host machine. While exFAT won&amp;#39;t cause this issue.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553963?ContentTypeID=1</link><pubDate>Tue, 11 Nov 2025 12:19:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40cc4007-0d4b-4530-b19e-d4168e796f02</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Which operating system have you used in your testing?&lt;br /&gt;&lt;br /&gt;How did you calculate your transfer speed to be around 90 KB/s?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]We used FAT32 file system, but later enabled support for exFAT and formated the SD card with exFAT.[/quote]
&lt;p&gt;Were transfer speed results similar in both cases - FAT32 vs exFAT?&lt;br /&gt;&lt;br /&gt;Have you tried to test when logging is disabled? What is the result?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553948?ContentTypeID=1</link><pubDate>Tue, 11 Nov 2025 10:34:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f70561f3-df65-4738-a054-7a0fa612de0c</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91753/usb-full-speed-transfer/385403"&gt;devzone.nordicsemi.com/.../385403&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553919?ContentTypeID=1</link><pubDate>Tue, 11 Nov 2025 08:22:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0399497f-edc5-45c8-97c5-32e5a0c5765e</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Which other posts do you refer to? Can you provide more information and share relevant links?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553829?ContentTypeID=1</link><pubDate>Mon, 10 Nov 2025 13:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ae9e322-a8c4-4a41-8a74-2b1b21bca7b5</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;Hi, in this case, if we are using legacy USB stack on nRF53, our hands are tied on this slow speed? But this achieved speed is also noticeably slower than other posts which can achieve over 300 kB/s.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553824?ContentTypeID=1</link><pubDate>Mon, 10 Nov 2025 13:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e843a787-da1f-400a-b50f-6b1b39f463cf</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Real performance improvement can be observed when using dual buffering with bigger SCSI buffer size. This is only possible when new USB stack is used together with&amp;nbsp;this&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/98206"&gt;double buffering PR&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;nRF53 (as is the case for nrf52) does not support double buffering for bulk endpoint and the driver needs to enable DMA with new data after each packet is ACKed by the host. This limits maximum achievable speed significantly.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553683?ContentTypeID=1</link><pubDate>Fri, 07 Nov 2025 13:21:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd6ca612-ce99-43b5-a76f-d85bffce142b</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please find the complete one here&lt;pre class="ui-code" data-mode="text"&gt;# Enable GPIO
CONFIG_GPIO=y
# Enable I2C
CONFIG_I2C=y
# Enable SPI
CONFIG_SPI=y

# Enable log and use it via Jlink RTT rather than CDC ACM 
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y    
CONFIG_LOG_BACKEND_UART=n
CONFIG_RTT_CONSOLE=n    
CONFIG_STDOUT_CONSOLE=n 
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096  
CONFIG_LOG_BUFFER_SIZE=8192
CONFIG_UART_CONSOLE=n
CONFIG_CONSOLE=n

# Enable Bluetooth LE
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME=&amp;quot;BORUS&amp;quot;
CONFIG_BT_BROADCASTER=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_FILTER_ACCEPT_LIST=y
# Extended BLE 
CONFIG_BT_EXT_ADV=y
CONFIG_BT_EXT_ADV_MAX_ADV_SET=2

# Enale floating point unit for float point calculation 
CONFIG_FPU=y
CONFIG_CBPRINTF_FP_SUPPORT=y

# Enable debugging 
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_DEBUG_OPTIMIZATIONS=y

# Enable multithread
CONFIG_MULTITHREADING=y

# Enable battery voltage monitoring
CONFIG_SENSOR=y
CONFIG_PWM=n
CONFIG_ADC=y
CONFIG_VOLTAGE_DIVIDER=y
CONFIG_NRFX_SAADC=y

# Configure USB device
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT=&amp;quot;BORUS&amp;quot;
CONFIG_USB_DEVICE_PID=0x0001
CONFIG_USB_DEVICE_VID=0x0001
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_SERIAL=n
CONFIG_USB_CDC_ACM=n
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_UART_LINE_CTRL=n
CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n

# Configure USB device to appear as DFU class
# Configure DFU autoupdate and reset
CONFIG_USB_DFU_CLASS=y
CONFIG_USB_REQUEST_BUFFER_SIZE=128
CONFIG_USB_DFU_ENABLE_UPLOAD=y
CONFIG_USB_DFU_PERMANENT_DOWNLOAD=y
CONFIG_USB_DFU_REBOOT=y
CONFIG_IMG_MANAGER=y
CONFIG_STREAM_FLASH=y
CONFIG_BOOTLOADER_MCUBOOT=y

# Configure file system 
CONFIG_FLASH_MAP=y
CONFIG_FLASH=y
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=n
CONFIG_FAT_FILESYSTEM_ELM=y
CONFIG_FS_FATFS_LFN=y
CONFIG_FS_FATFS_EXFAT=y
CONFIG_FS_LOG_LEVEL_INF=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# Configure SPI RAM buffer size
CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=128

# Configure mass storage
CONFIG_USB_MASS_STORAGE=y
CONFIG_DISK_ACCESS=y
CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
CONFIG_DISK_LOG_LEVEL_DBG=y
CONFIG_DISK_DRIVERS=y
CONFIG_DISK_DRIVER_SDMMC=y
CONFIG_DISK_DRIVER_FLASH=y
CONFIG_MASS_STORAGE_DISK_NAME=&amp;quot;SD&amp;quot;

# Configure BLE encryption
CONFIG_NRF_SECURITY=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_PSA_CRYPTO_DRIVER_CC3XX=y
CONFIG_PSA_CRYPTO_DRIVER_OBERON=n
CONFIG_PSA_WANT_KEY_TYPE_AES=y
CONFIG_PSA_WANT_ALG_CTR=y
CONFIG_HEAP_MEM_POOL_SIZE=4096
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=8192
CONFIG_TEST_RANDOM_GENERATOR=y

# Configure Settings subsystem
CONFIG_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Configure Watchdog
CONFIG_WATCHDOG=y
CONFIG_WDT_DISABLE_AT_BOOT=n

# Enable State Machine Framework
CONFIG_SMF=y

# Enable DSP
CONFIG_CMSIS_DSP=y
CONFIG_CMSIS_DSP_FILTERING=y
CONFIG_CMSIS_DSP_TRANSFORM=y
CONFIG_CMSIS_DSP_STATISTICS=y
CONFIG_CMSIS_DSP_FASTMATH=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_RING_BUFFER=y

# Power management
CONFIG_PM_DEVICE=y
CONFIG_RAM_POWER_DOWN_LIBRARY=y
CONFIG_POWEROFF=y

CONFIG_BMI270=y
CONFIG_BMI270_TRIGGER_GLOBAL_THREAD=y
CONFIG_BMP388=y
CONFIG_BMP388_TRIGGER_GLOBAL_THREAD=y
CONFIG_BMP388_ODR_RUNTIME=y
CONFIG_BMP388_OSR_RUNTIME=y 

# ------------------- Edge ML -------------------
CONFIG_CPP=y                
CONFIG_STD_CPP11=y
CONFIG_FP16=n
CONFIG_EDGE_IMPULSE=y
CONFIG_EDGE_IMPULSE_URI=&amp;quot;/Users/gw23523/Downloads/test-cpp-mcu-v3.zip&amp;quot;
CONFIG_EI_WRAPPER=y

# ------------------- Turn below ON for Optimisation -------------------
# Stack sizes (This needs to be optimised using the thread analyzer below)
# CONFIG_MAIN_STACK_SIZE=1024
# CONFIG_ISR_STACK_SIZE=1536
# CONFIG_IDLE_STACK_SIZE=256
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Thread analyser for debug purposes
# CONFIG_THREAD_ANALYZER=y
# CONFIG_THREAD_ANALYZER_USE_LOG=y
# CONFIG_THREAD_ANALYZER_AUTO=y
# CONFIG_THREAD_ANALYZER_AUTO_INTERVAL=10
# CONFIG_THREAD_NAME=y
# ----------------------------------------------------------------------&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553681?ContentTypeID=1</link><pubDate>Fri, 07 Nov 2025 13:19:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:484e22a2-a9a6-41f9-8e2d-1233231681ba</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Can you share your complete project configuration?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553648?ContentTypeID=1</link><pubDate>Fri, 07 Nov 2025 10:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df379b89-b6c5-48f6-b1da-79f73485ba87</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have tried to increase the buffer size to 128 or 1024. I can confirm this has limited help on increasing transfer speed. Specifically, when copy 10.5 MB file, the time is decreased from previous 131 seconds to now 125 seconds (buffer size = 1024). There is an increase here but not a game changer. Can you suggest other posibilities to debug this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553598?ContentTypeID=1</link><pubDate>Thu, 06 Nov 2025 18:22:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5771680-6e0b-4ee1-96fe-6405beaa40d7</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We are using the ZDSD32 (&lt;a href="https://jlcpcb.com/partdetail/Zetta-ZDSD32GLGEAG/C5188571"&gt;this one here&lt;/a&gt;). It is basically a SD card without being able to plug in or out.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Below is our current SPI configuration on the SPI4 bus in device tree&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi4 {
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;spi4_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;spi4_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_LOW&amp;gt;;

    sdhc0: sdhc@0 {
        compatible = &amp;quot;zephyr,sdhc-spi-slot&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        status = &amp;quot;okay&amp;quot;;
        mmc {
            compatible = &amp;quot;zephyr,sdmmc-disk&amp;quot;;
            status = &amp;quot;okay&amp;quot;;
            disk-name = &amp;quot;SD&amp;quot;; 
        };
        spi-max-frequency = &amp;lt;50000000&amp;gt;;
    };
};&lt;/pre&gt; and the pin control&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;	spi4_default: spi4_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;;
			nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
		};
	};

	spi4_sleep: spi4_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;;
			low-power-enable;
		};
	};&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We will try to increase the buffer size as you recommended tmr to test the result.&lt;/p&gt;
&lt;p&gt;Best&lt;/p&gt;
&lt;p&gt;Shuhao&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow USB MSC transfer speed on nRF5340 with SD card</title><link>https://devzone.nordicsemi.com/thread/553591?ContentTypeID=1</link><pubDate>Thu, 06 Nov 2025 17:21:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e591fae2-9ba1-4bef-9516-556cf37f10ab</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Which SD card do you use?&lt;br /&gt;&lt;br /&gt;Can you show your SPI related configuration?&lt;br /&gt;&lt;br /&gt;You can try to increase the value of&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_SPI_NRFX_RAM_BUFFER_SIZE"&gt;CONFIG_SPI_NRFX_RAM_BUFFER_SIZE&lt;/a&gt;. What is the result?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>