<?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>Using the Mass example on my custom board, but first getting it running on the nRF52840dk QSPI flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118708/using-the-mass-example-on-my-custom-board-but-first-getting-it-running-on-the-nrf52840dk-qspi-flash</link><description>Hi, 
 I&amp;#39;ve been using the nRF5 SDK (17.1.0) USB Mass storage code for a data logger I have made. I am using a memory chip larger than 16KB and that code has bugs when you go over that size. So I&amp;#39;m moving to the nRF Connect SDK on advice I read on different</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Feb 2025 00:07:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118708/using-the-mass-example-on-my-custom-board-but-first-getting-it-running-on-the-nrf52840dk-qspi-flash" /><item><title>RE: Using the Mass example on my custom board, but first getting it running on the nRF52840dk QSPI flash</title><link>https://devzone.nordicsemi.com/thread/522950?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2025 00:07:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e04e2b2-db33-464a-a7c3-57bc57d8b222</guid><dc:creator>FCian</dc:creator><description>&lt;p&gt;Thank you so much!&amp;nbsp; You&amp;#39;ve really helped my get going.&amp;nbsp; My next step is to add my custom board and try to get it working on there.&amp;nbsp; I&amp;#39;ll open a new ticket if I need help with that.&amp;nbsp; &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;ian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the Mass example on my custom board, but first getting it running on the nRF52840dk QSPI flash</title><link>https://devzone.nordicsemi.com/thread/522706?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 16:54:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81a6ac58-fcef-4f19-afa9-dd187fac0a9b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hey ian,&lt;/p&gt;
&lt;p&gt;Glad to hear that it seems to be working now. In my sample I was only allocation a portion of the flash to the fafs filesystem, see memory layout below. To use the whole chip, you have to relocate the mcuboot secondary slot to the internal flash (used to for staging FW updates during FW updates). This is if you want to support DFU.&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/6038.memory_5F00_report.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Using the&amp;nbsp;whole external_flash region for fatfs_storage:&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Increase&amp;nbsp;the size of the &amp;#39;fatfs_storage&amp;#39; partition defined in the pm_static.yml file in the project root:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;fatfs_storage:
  address: 0x0
  affiliation:
  - disk
  device: DT_CHOSEN(nordic_pm_ext_flash)
  end_address: 0x800000
  extra_params:
    disk_cache_size: 0x1000
    disk_name: SD
    disk_read_only: 0x0
    disk_sector_size: 0x200
  placement:
    align:
      start: 0x1000
    before:
    - end
  region: external_flash
  size: 0x800000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2. In the sysbuild.conf file, comment the &amp;quot;SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y&amp;quot; line.&lt;/p&gt;
&lt;p&gt;3. Do a full rebuild.&lt;/p&gt;
&lt;p&gt;4. You can run &amp;quot;west build -t partition_manager_report&amp;quot; or click the &amp;quot;Memory report&amp;quot; button in the extension to view the new memory layout.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="FCian"]Any pointers to get it use the full 16 Mbit (2MB) and eventually my full 2Gbit memory chip, that would be great.[/quote]
&lt;p&gt;It should&amp;nbsp;ideally only be a matter of correctly&amp;nbsp;defining the properties for your flash IC in the devicetree similar to how it is done for the macronix Ic on the nRF52840 DK here:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/7cef0e361467136064a066de718af12e00a9e7d9/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts#L241"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/7cef0e361467136064a066de718af12e00a9e7d9/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts#L241&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For instance, you will need to add the &amp;quot;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/7cef0e361467136064a066de718af12e00a9e7d9/dts/bindings/mtd/nordic%2Cqspi-nor.yaml#L57"&gt;address-size-32&lt;/a&gt;;&amp;quot; property in your node to enable 32-bit addressing needed for larger memory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the Mass example on my custom board, but first getting it running on the nRF52840dk QSPI flash</title><link>https://devzone.nordicsemi.com/thread/522540?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 23:50:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:734f0798-5c4f-4733-b731-8097e49cb5e4</guid><dc:creator>FCian</dc:creator><description>&lt;p&gt;Hey Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I updated to SDK v2.9.0 and I can build it with no issues.&amp;nbsp; I tried flashing the DK I have, but still the same issue.&amp;nbsp; I&amp;#39;ve tried it on my windows 11 machine, and 2 windows 10 machines.&amp;nbsp; The behavior is slightly different on windows 10, it says &amp;quot;Please insert a disk into D:&amp;quot;, but 11 just says it needs to be formatted and then dies in the format.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the board I&amp;#39;m using:&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/IMG_5F00_1908.JPG" alt=" " /&gt;&lt;/p&gt;
&lt;p&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/connected-board.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Well, alright, I just plugged it in again to copy the COM output for you and it works.&amp;nbsp; I get a drive :)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The drive is only 0.98MB, though.&amp;nbsp; Here&amp;#39;s the COM output.&lt;/p&gt;
&lt;p&gt;*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***&lt;br /&gt;*** Using nRF Connect SDK v2.9.0-7787b2649840 ***&lt;br /&gt;*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***&lt;br /&gt;I: Starting bootloader&lt;br /&gt;I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;I: Boot source: none&lt;br /&gt;I: Image index: 0, Swap type: none&lt;br /&gt;I: Bootloader chainload address offset: 0xc000&lt;br /&gt;�*** Booting My Application v2.9.0 - unknown commit ***&lt;br /&gt;*** Using nRF Connect SDK v2.9.0-7787b2649840 ***&lt;br /&gt;*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***&lt;br /&gt;I: Initialize device SD&lt;br /&gt;I: offset 0, sector size 512, page size 4096, volume size 1048576&lt;br /&gt;I: Starting Bluetooth Peripheral LBS example 2.9.0&lt;br /&gt;&lt;span style="background-color:#ffff99;"&gt;I: Area 0 at 0x0 on mx25r6435f@0 for 1048576 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff99;"&gt;I: Mount /SD:: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff99;"&gt;I: /SD:: bsize = 512 ; frsize = 512 ; blocks = 2008 ; bfree = 2008&lt;/span&gt;&lt;br /&gt;I: /SD: opendir: 0&lt;br /&gt;I: End of files&lt;br /&gt;I: The device is put in USB mass storage mode.&lt;br /&gt;I: 2 Sectors of 4096 bytes&lt;br /&gt;I: alloc wra: 0, fd0&lt;br /&gt;I: data wra: 0, 1c&lt;br /&gt;I: SoftDevice Controller build revision: &lt;br /&gt;I: 2d 79 a1 c8 6a 40 b7 3c |-y..j@.&amp;lt;&lt;br /&gt;I: f6 74 f9 0b 22 d3 c4 80 |.t..&amp;quot;...&lt;br /&gt;I: 74 72 82 ba |tr.. &lt;br /&gt;I: HW Platform: Nordic Semiconductor (0x0002)&lt;br /&gt;I: HW Variant: nRF52x (0x0002)&lt;br /&gt;I: Firmware: Standard Bluetooth controller (0x00) Version 45.41337 Build 3074452168&lt;br /&gt;I: No ID address. App must call settings_load()&lt;br /&gt;I: Bluetooth initialized&lt;br /&gt;I: Identity: C5:EF:BC:01:81:B4 (random)&lt;br /&gt;I: HCI: version 6.0 (0x0e) revision 0x106b, manufacturer 0x0059&lt;br /&gt;I: LMP: version 6.0 (0x0e) subver 0x106b&lt;br /&gt;I: Advertising successfully started&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll get familiar with the code, and let you know if it continues working.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any pointers to get it use the full 16 Mbit (2MB) and eventually my full 2Gbit memory chip, that would be great.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;ian&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the Mass example on my custom board, but first getting it running on the nRF52840dk QSPI flash</title><link>https://devzone.nordicsemi.com/thread/522527?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 21:38:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0c68ae1-0f90-4fb8-b55a-3f87b2abb343</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi ian,&lt;/p&gt;
&lt;p&gt;Strange. I have not been able to reproduce this issue here on my Windows or Linux PC. I also had a colleague with a Windows PC try the same hex file I uploaded, but it worked for him as well.&amp;nbsp;I was able to format the drive and store files to it (it was already formatted so I did not have to format it but I did it anyway).&lt;/p&gt;
[quote user="FCian"]I also opened the project you sent and was not able to build it.&amp;nbsp; Here are the errors if you are interested.&amp;nbsp;&amp;nbsp;[/quote]
&lt;p&gt;Sorry, I realize now that the project will not build out of the box with SDK v2.7.0 (are some minor API changes in main.c). It is probably easier to download SDK v2.9.0 and build against it. I recommend checking the terminal output for actual build errors and warnings. The &amp;quot;Problems&amp;quot; tab has multiple sources and the errors listed are not always relevant to the build.&amp;nbsp;&lt;/p&gt;
[quote user="FCian"]I was wondering if that meant the board/memory chip wasn&amp;#39;t working right, so I also tested the usbd_msc example from nRF5 SDK 11 and it worked just fine.&amp;nbsp;[/quote]
&lt;p&gt;Assume it wasn&amp;#39;t SDK 11, but just to make sure, was it SDK v.17.1.0 you tested with? I don&amp;#39;t have a good explanation for why it would work with the old sample, but none of the samples in the nRF Connect SDK. Does the DK have a rev. 2 or 3 of the nRF52840?&amp;nbsp;&amp;nbsp;&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/pastedimage1739309800600v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit:&amp;nbsp;&lt;/strong&gt;forgot to add that the FW I posted has logging enabled over UART if you want to check if any errors are reported.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the Mass example on my custom board, but first getting it running on the nRF52840dk QSPI flash</title><link>https://devzone.nordicsemi.com/thread/522059?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 20:50:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:851708ec-7932-456d-832c-0952cf0d9e22</guid><dc:creator>FCian</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the help.&lt;/p&gt;
&lt;p&gt;I programmed this hex file on to my 52840DK and it behaves exactly the same as the Mass the project I used.&amp;nbsp; Windows sees it as a drive, but fails when trying to format it.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the output of the nrfjprog command in case you&amp;#39;d like to see it.&lt;/p&gt;
&lt;p&gt;C:\Nordic\ExampleProjects&amp;gt; nrfjprog --program 7444.merged.hex --chiperase --verify --reset&lt;br /&gt;[ #################### ] 0.378s | Erase file - Done erasing&lt;br /&gt;[ #################### ] 1.897s | Program file - Done programming&lt;br /&gt;[ #################### ] 1.941s | Verify file - Done verifying&lt;br /&gt;Applying system reset.&lt;br /&gt;Run.&lt;br /&gt;[error] [ Client] - Worker process dies while processing command close&lt;/p&gt;
&lt;p&gt;I was wondering if that meant the board/memory chip wasn&amp;#39;t working right, so I also tested the usbd_msc example from nRF5 SDK 11 and it worked just fine.&amp;nbsp; I had to format the drive, but it formatted and I was able to add a file.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also opened the project you sent and was not able to build it.&amp;nbsp; Here are the errors if you are interested.&amp;nbsp;&amp;nbsp;&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/special_5F00_build_5F00_error.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;ian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the Mass example on my custom board, but first getting it running on the nRF52840dk QSPI flash</title><link>https://devzone.nordicsemi.com/thread/522041?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 18:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0f0d3d1-843a-4692-b6d6-a91ba1824b0f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello ian,&lt;/p&gt;
&lt;p&gt;Could you please try the attached project or&amp;nbsp;hex file and check if you get the same result? This project is based on the Bluetooth LED button sample from SDK v2.9.0, but with BLE DFU (not tested) and FATFS storage on the QSPI flash.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo sample&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_master_5F00_storage_5F00_qspi.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_master_5F00_storage_5F00_qspi.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hex file&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7444.merged.hex"&gt;devzone.nordicsemi.com/.../7444.merged.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;Hex file can be programmed with nrfjprog or nRF Util&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Programming with nrfutil device
$ nrfutil device program --firmware merged.hex --options chip_erase_mode=ERASE_ALL,reset=RESET_SYSTEM,verify=VERIFY_HASH
# With nrfjprog
$ nrfjprog --program merged.hex --chiperase --verify --reset&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>