<?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>Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113113/programming-qspi-with-nrfjprog-for-nrf5340</link><description>I am trying to program a QSPI flash with a file system. I have confirmed that my qspi ini is correct as i can read write and erase. I created a small file system on an usb disk and used HxD to read it to a .bin of the file system. I can then either use</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jul 2024 01:15:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113113/programming-qspi-with-nrfjprog-for-nrf5340" /><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/495311?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2024 01:15:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54282984-8c1c-450b-9951-3ebf1cbd4ec4</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;No but hopfully there will be a simpler method then pm_static in the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494745?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2024 09:24:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f63ed54f-09f8-4735-aee5-1dd638af3725</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Edward,&lt;/p&gt;
&lt;p&gt;Apologies for the delay as it&amp;#39;s the summer holidays and we are understaffed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you still have the issue?&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494625?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 14:45:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2d1c256-a88c-4289-aad8-4e1168710228</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;i had the external memory setup incorrectly in the pm_static&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494602?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 13:45:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dd5a359-54a7-42ef-b17a-fdbf79fa6c51</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;So I believe this is something to do with partition manager since my project uses bluetooth and the fs project does not. Below is my device tree and that works in fs but in my project i require a pm static.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;mx25l256 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		/* 128kiB external storage partition */
		external_partition: partition@f0000 {
			label = &amp;quot;disk&amp;quot;;
			reg = &amp;lt;0x0000f0000 0x000800000&amp;gt;;
		};
	};
};

/ {
	msc_disk0 {
		status=&amp;quot;okay&amp;quot;;
		compatible = &amp;quot;zephyr,flash-disk&amp;quot;;
		partition = &amp;lt;&amp;amp;external_partition&amp;gt;;
		disk-name = &amp;quot;SD&amp;quot;;
		/* cache-size == page erase size */
		cache-size = &amp;lt;4096&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494599?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 13:38:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcfdb041-7459-4d8b-8c19-358876f449e8</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;Ok so now I can read the files from the fs project so I need to figure out the difference between the 2 projects.&amp;nbsp; I did have to add 32bit addressing to the device tree as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494591?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 13:14:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fdfe348-d8df-4058-850b-e82c9184f781</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;So i have gotten it to write by&amp;nbsp;adding a 32bit addressing custom command,&amp;nbsp;but i cant seem to find the file system now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494552?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 11:31:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a865be9-9e8d-4c08-978c-202605a8a8da</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;so the files seems to be overwriting itself every&amp;nbsp;page.&amp;nbsp;&amp;nbsp;if i limit the file to the first page then it works but after that it seems to overwrite it.&amp;nbsp; It cant seem to move past the first page.&amp;nbsp;below is my init and i am using the&amp;nbsp;&lt;span&gt;MX25L25645GZNI&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;;----------------------------------------------
; Deprecated, use config.toml format instead
;----------------------------------------------

; nrfjprog QSPI configuration file.

[DEFAULT_CONFIGURATION]
; Define the capacity of the flash memory device in bytes. Set to 0 if no external memory device is present in your board.
MemSize = 0x2000000

; Define the desired ReadMode. Valid options are FASTREAD, READ2O, READ2IO, READ4O and READ4IO
ReadMode = READ4IO

; Define the desired WriteMode. Valid options are PP, PP2O, PP4O and PP4IO
WriteMode = PP4IO

; Define the desired AddressMode. Valid options are BIT24 and BIT32
AddressMode = BIT32

; Define the desired Frequency. Valid options are M2, M4, M8, M16 and M32
Frequency = M16

; Define the desired SPI mode. Valid options are MODE0 and MODE3
SpiMode = MODE0

; Define the desired SckDelay. Valid options are in the range 0 to 255
SckDelay = 0x80

; Define SPI interface timing. Valid options are in the range of 0 to 7.
; This argument is only used for devices where the dll function NRFJPROG_qspi_set_rx_delay() is supported.
RxDelay = 2

; Define the desired IO level for DIO2 and DIO3 during a custom instruction. Valid options are LEVEL_HIGH and LEVEL_LOW
CustomInstructionIO2Level = LEVEL_LOW
CustomInstructionIO3Level = LEVEL_HIGH

; Define the assigned pins for the QSPI peripheral. Valid options are those existing in your device
; For nRF53, QSPI pins are not configurable and these values are ignored.
CSNPin = 17
CSNPort = 0
SCKPin = 19
SCKPort = 0
DIO0Pin = 13
DIO0Port = 0
DIO1Pin = 14
DIO1Port = 0
DIO2Pin = 15
DIO2Port = 0
DIO3Pin = 16
DIO3Port = 0

; Define the Index of the Write In Progress (WIP) bit in the status register. Valid options are in the range of 0 to 7.
WIPIndex = 0

; Define page size for commands. Valid sizes are PAGE256 and PAGE512.
PPSize = PAGE256

; Custom instructions to send to the external memory after initialization. Format is instruction code plus data to send in between optional brakets. 
; These instructions will be executed each time the qspi peripheral is initiated by nrfjprog. 
; To improve execution speed on consecutive interations with QSPI, you can run nrfjprog once with custom initialization, and then comment out the lines below.
; Numbers can be given in decimal, hex (starting with either 0x or 0X) and binary (starting with either 0b or 0B) formats. 
; The custom instructions will be executed in the order found. 
; This example includes two commands, first a WREN (WRite ENable) and then a WRSR (WRite Satus Register) enabling the Quad Operation and the High Performance
; mode for the MX25R6435F memory present in the nRF52840 DK.
InitializationCustomInstruction =  0x06
InitializationCustomInstruction =  0x01, [0x40, 0, 0x2] 

; If retention is enabled, device RAM contents will be read and buffered during QSPI driver initialization.
; The buffered data will be written back to the device when unitializing the driver, restoring the original device RAM state.
; Enabled: RetainRAM = 1, Disabled: RetainRAM = 0
RetainRAM = 1

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494527?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 09:47:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cde2d9ec-3818-4354-a1a0-897434b1965a</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;How would I be able to debug nrfjprog&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494526?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 09:46:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d958392-36fc-403e-beb3-f304df39ffbe</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;Well since I am trying to load a file system it is a bit different but the Intel hex file I generated looks correct.&amp;nbsp; I have also tried the base of qspi at 0x10000000 with the same results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494517?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 09:21:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d2badfd-e60d-4e6f-bd3e-ccf217da3df2</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Edward,&lt;/p&gt;
&lt;p&gt;It does look puzzling. Please make sure our bin file is properly aligned, i.e. sometimes padding can help. Also, please verify that your memory layout does not overlap with any other critical regions. For further understanding, it would also be good to use a debugger t step through the initialization and programming process.&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494425?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 16:56:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b3098b4-736c-423a-a256-603c2c6e7b17</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;D:\ZephyrWorkspace\ShockStream\Controller\fs&amp;gt;D:\Nordic\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-objcopy.exe  -v -I binary -O ihex --change-addresses 0x100f0000 nor2.bin nor2.hex
copy from `nor2.bin&amp;#39; [binary] to `nor2.hex&amp;#39; [ihex]

D:\ZephyrWorkspace\ShockStream\Controller\fs&amp;gt;nrfjprog  --log -f nRF53 --qspiini con_qspi.ini    --qspieraseall
WARNING: An operation that can take up to several minutes is being executed.
WARNING: Please remain patient.
Initializing the QSPI peripheral.
Erasing.
Uninitializing the QSPI peripheral.

D:\ZephyrWorkspace\ShockStream\Controller\fs&amp;gt;nrfjprog  --log -f nRF53 --qspiini con_qspi.ini --memrd 0x100F0000  --n 100

[ #################### ]   0.000s | Reading external memory, 0x0064 bytes @ 0x000F0000 - Done
0x100F0000: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
0x100F0010: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
0x100F0020: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
0x100F0030: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
0x100F0040: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
0x100F0050: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
0x100F0060: FFFFFFFF                              |....|&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494395?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 13:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84b8d06d-07c8-49ed-9f50-4e3a14765d6b</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I already did that it is all 0xff.&amp;nbsp; You can also see that the other bytes in the write read are 0xff&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494377?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 13:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db80dd24-3ca8-403c-82e6-0dd43ba661a7</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Edward,&lt;/p&gt;
&lt;p&gt;Could you check that the QSPI flash memory is properly erased before writing?&lt;/p&gt;
&lt;p&gt;nrfjprog --&lt;span&gt;log&lt;/span&gt; -f nRF53 --qspiini con_qspi.ini --qspieraseall&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming QSPI with nrfjprog for nrf5340</title><link>https://devzone.nordicsemi.com/thread/494249?ContentTypeID=1</link><pubDate>Tue, 16 Jul 2024 22:39:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24c58c5f-6f72-4c10-8a6e-dca773986d3d</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I tried doing the same to my zephyr.hex from the project with the same results&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>