<?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>Xiao BLE Sense (mbed)/microSD card access via Xiao Expansion board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120209/xiao-ble-sense-mbed-microsd-card-access-via-xiao-expansion-board</link><description>Hi All, 
 Simply put I am trying to use the Xiao BLE Sense board connected to the Expansion board (with SD card slot) to write audio recorded data from the Xiao embedded PDM microphone to the microSD card. 
 Development setup: 
 HW: Apple M2 Ultra (silicon</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 12 Apr 2025 14:59:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120209/xiao-ble-sense-mbed-microsd-card-access-via-xiao-expansion-board" /><item><title>RE: Xiao BLE Sense (mbed)/microSD card access via Xiao Expansion board</title><link>https://devzone.nordicsemi.com/thread/531589?ContentTypeID=1</link><pubDate>Sat, 12 Apr 2025 14:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:742e1e24-770f-497f-8d14-263345bde5a6</guid><dc:creator>rickmkrebs</dc:creator><description>&lt;p&gt;Thank you for your help Sigurd. &amp;nbsp;I made a little progress and for posterity I&amp;#39;ll mention the steps I stumbled on to get here. &amp;nbsp;I got past the initialization error I think in part due to reformatting my SD card to exFat using the SD Memory Card Formatter for Mac (choosing option &amp;quot;overwrite format&amp;quot;) at (&lt;a href="https://www.sdcard.org/downloads/formatter/sd-memory-card-formatter-for-mac-download/"&gt;https://www.sdcard.org/downloads/formatter/sd-memory-card-formatter-for-mac-download/&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;But I also slightly adapted main.c using the tutorial here:&amp;nbsp;&lt;a href="https://www.embeddedrelated.com/showarticle/1601.php"&gt;https://www.embeddedrelated.com/showarticle/1601.php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I followed author Billoo&amp;#39;s prj.conf and overlay suggestions (pasted below), and until I had reformatted the SD card as above I was getting a &amp;quot;no CMD8 support&amp;quot; error. &amp;nbsp;Formatting the SD relieved these errors though now there are new file I/O errors. &amp;nbsp;But I&amp;#39;m not concerned about this as this should be more straightforward. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are right that I did not need to make changes to yaml or json files. &amp;nbsp;Of note, I did ditch the Xiao Expansion board (at least for now) and went back to simple SPI set up using Adafruit microSD breakout board (&lt;a href="https://www.adafruit.com/product/254"&gt;https://www.adafruit.com/product/254&lt;/a&gt;) making sure to keep the breakout board to no more than 3.3 V.&lt;/p&gt;
&lt;p&gt;My logic analyzer output appears consistent with spi2 (CPOL = 1, CPHA = 0), though Billoo uses SPI1. &amp;nbsp;I&amp;#39;m going to try that next and this may help with the file I/O errors. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_04_2D00_12-at-8.00.59_2F20_AM.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_04_2D00_12-at-7.41.57_2F20_AM.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_04_2D00_12-at-7.41.29_2F20_AM.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xiao BLE Sense (mbed)/microSD card access via Xiao Expansion board</title><link>https://devzone.nordicsemi.com/thread/530552?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 07:57:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d3dbe4c-abdb-44a3-9c65-66c61a35d5ad</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Alright, let&amp;#39;s get to your questions. I will answer them as best I can:&lt;/p&gt;
[quote user=""]* how does the SD host controller figure into this process and am I missing something in the configuration to enable this?[/quote]
&lt;p&gt;MMC drivers seem to be at &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/drivers/disk"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/drivers/disk&lt;/a&gt;. I would guess this use &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/disk/mmc_subsys.c"&gt;mmc_subsys.c&lt;/a&gt;, &lt;br /&gt;Also &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/sd"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/sd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I see in the Disk folder that we got a CONFIG_DISK_LOG_LEVEL. If you have not already done so, try to set CONFIG_DISK_LOG_LEVEL_DBG and see if that gives you some debug info that you did not already have.&lt;/p&gt;
&lt;p&gt;Also CONFIG_SD_LOG_LEVEL_DBG.&lt;/p&gt;
[quote user=""]* how to use direct block level access (meaning using DMA?) to the SD card/is this possible as an alternative to using SPI?[/quote]
&lt;p&gt;I have not heard about anyone using direct block level access before, and my search gives no other this that this ticket. &lt;/p&gt;
[quote user=""]* do I need to make changes to yaml and/or .json files in order to enable SD functionality for this board and/or create custom board support for the Xiao?[/quote]
&lt;p&gt;I would assume that with the shield and an zephyr SD Card example that should be all you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xiao BLE Sense (mbed)/microSD card access via Xiao Expansion board</title><link>https://devzone.nordicsemi.com/thread/529856?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 17:30:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d54cd08-a776-4fb9-b28d-64a06190d294</guid><dc:creator>rickmkrebs</dc:creator><description>&lt;p&gt;Yes, I have been able to flash any of the samples on the nRF Connect/Zephyr OS library as well as all of the demonstration programs built from these samples done by Markus Krausse in his series at:&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=6zyqi4ICMaA&amp;amp;list=PLmnNfQgEcbpGOcdnVdPQHbTfdahWBJb0Y&amp;amp;index=10"&gt;https://www.youtube.com/watch?v=6zyqi4ICMaA&amp;amp;list=PLmnNfQgEcbpGOcdnVdPQHbTfdahWBJb0Y&amp;amp;index=10&lt;/a&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xiao BLE Sense (mbed)/microSD card access via Xiao Expansion board</title><link>https://devzone.nordicsemi.com/thread/529685?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 07:11:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d023668-9cfc-4b9b-978b-efcbbbfefa97</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;The VS Code extension looks for a debugger to use &amp;quot;west flash&amp;quot;, and from &lt;a href="https://docs.zephyrproject.org/latest/boards/seeed/xiao_ble/doc/index.html"&gt;Xiao BLE Zephyr docs&lt;/a&gt;: &lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1743405020511v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you see here, you need an external debugger to use this.&lt;/p&gt;
&lt;p&gt;So let&amp;#39;s stick to UF2 programming for now, which should use the bootloader on the Xiao instead.&lt;/p&gt;
[quote user="rickmkrebs"]But when I copy the .uf2 file to the Xiao Sense I do not see any response or output on the board (no response to button press and no display in the lvgl sample case). &amp;nbsp;[/quote]
&lt;p&gt;Have you ever been able to program any other files to the Xiao Sense using .uf2 files?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xiao BLE Sense (mbed)/microSD card access via Xiao Expansion board</title><link>https://devzone.nordicsemi.com/thread/529611?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2025 19:33:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09202a31-35d7-4edc-a594-afa4e0359555</guid><dc:creator>rickmkrebs</dc:creator><description>&lt;p&gt;Thank you for your response Sigurd, I appreciate it. &amp;nbsp;What you say makes sense. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I did just try to flash the two examples mentioned for the Xiao Expansion Board (the LED button example at samples/basic/button) and LVGL basic example (at samples/subsys/display/lvgl) and they build without error.&lt;/p&gt;
&lt;p&gt;But when I copy the .uf2 file to the Xiao Sense I do not see any response or output on the board (no response to button press and no display in the lvgl sample case). &amp;nbsp;&lt;/p&gt;
&lt;p&gt;And the Xiao board is unmounted when the .uf2 file is flashed so I cannot use the terminal monitor to check any output.&lt;/p&gt;
&lt;p&gt;Here is the output from the button sample build.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_03_2D00_28-at-12.03.52_2F20_PM.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I dragged the small screen of the output from the .uf2 file copy into the VS Code output screenshot above to show the response that always comes up, that &amp;quot;Finder can&amp;#39;t complete the operation because some data in the &amp;quot;zephyr.uf2&amp;quot; can&amp;#39;t be read or written&amp;quot;. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have not been too concerned about this but I do wonder if this is an issue or could be an issue. &amp;nbsp;I have Segger JLink and associated libraries, etc. installed (and up to date) but this is a known issue I think that the VS Code cannot locate the Xiao (and perhaps other boards) under Connected Devices. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;For this reason I cannot use $ west flash (after building the .hex file)&lt;/p&gt;
&lt;p&gt;This is probably not related to anything (and may be related to the fact that I am using an Apple desktop) but it would be great if this were possible at some point (being able to directly flash a .hex file to a connected board on a Mac).&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_03_2D00_28-at-12.24.03_2F20_PM.png" /&gt;&lt;/p&gt;
&lt;p&gt;Thank you again for your help, and know that you are correct that there is a way for this to work!&lt;/p&gt;
&lt;p&gt;Rick&lt;/p&gt;
&lt;p&gt;post script: I have updated to v.2.9.0 for both SDK and toolkit since I posted my question yesterday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xiao BLE Sense (mbed)/microSD card access via Xiao Expansion board</title><link>https://devzone.nordicsemi.com/thread/529456?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2025 08:48:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d01173d0-2652-451f-9aec-aaae2dd5eaf4</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]If it is known that the Xiao BLE Sense (mbed) board simply cannot be used in the nRF Connect/Zephyr environment[/quote]
&lt;p&gt;I don&amp;#39;t see why it should not work. So hopefully I can help you get to the bottom of this.&lt;/p&gt;
&lt;p&gt;First, have you tried the examples for the Expansion board at &lt;a href="https://docs.zephyrproject.org/latest/boards/shields/seeed_xiao_expansion_board/doc/index.html"&gt;Seeed Studio XIAO Expansion Board zephyr docs&lt;/a&gt;? &lt;br /&gt;Not for SD Card, but just neat to know that it works with the shield configuration.&lt;/p&gt;
[quote user=""]* do I need to make changes to yaml and/or .json files in order to enable SD functionality for this board and/or create custom board support for the Xiao?[/quote]
&lt;p&gt;If you build with the expansion board, the SD card should be enabled in &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/c95fb4e1ce868b280593c56c767e9b25a5bdbb06/boards/shields/seeed_xiao_expansion_board/seeed_xiao_expansion_board.overlay#L53-L68"&gt;DTS&lt;/a&gt;. However, the application would need SPI Kconfig configurations.&lt;/p&gt;
&lt;p&gt;We can get to your other questions later, but lets start with this.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>