<?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>Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116058/flash-mem-through-spi-not-response</link><description>Hi, in our project we use the nRF52832 and a external flash memory MX25L3206E connected on this pins: 
 
 
 Take note in this project we also use SPIM0 to manage an IMU and SPIM2 to flash with this configuration: 
 
 This is the prj.conf of the project</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Nov 2024 15:16:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116058/flash-mem-through-spi-not-response" /><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/511141?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2024 15:16:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35c5f19b-5176-49c8-af4b-0b42e3f8dfba</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am glad to hear you got the basic communication working. I do not have any imediate suggestions for thy WEL bit, unfortunately.&lt;/p&gt;
&lt;p&gt;Br,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/511044?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2024 10:28:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95f43e23-4362-49f6-926a-d6acc9de4d58</guid><dc:creator>SBou</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;After erase and program the microcontroller finally I reach read the device ID of the flash memory.&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-2024_2D00_11_2D00_19-090432.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Now I have another problem that is that the flash memory is waiting the bit WEL change, and is here block in a &amp;quot;While&amp;quot; of my code.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*! Function for checking that the Write Enable Latch is Active
 */
static void FLASH_Wait_For_WEL( void )
{
  while( !( FLASH_Read_Status_Register() &amp;amp;                                \
                    FLASH_SR_WRITE_ENABLE_LATCH_BIT ) ){
    k_msleep(5);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After enable writing, this bit should be &amp;quot;1&amp;quot; but doesn&amp;#39;t change.&lt;/p&gt;
&lt;p&gt;When we have more info about this we ask you or open another tread.&lt;/p&gt;
&lt;p&gt;Or if you have any suggestion we can study it.&lt;/p&gt;
&lt;p&gt;Many thanks by your support.&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/510876?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2024 11:51:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59722954-88ac-4d25-bcf1-69754d8aa143</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you perform an erase all operation (for instance nrfjprog --recover) when you programmed the new firmware? That is requiered in order to erase the UICR and make the pin a GPIO again, as that configuration is persistent if you do not and earlier firmware enabled pin reset. If it still does not work, can you share the generated .config and zephyr.dts from your build folder so that we see which configuration is actually being used? Also, which SDK version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/510874?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2024 11:42:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10291265-72f8-4d9b-85a9-57fd05812611</guid><dc:creator>SBou</dc:creator><description>&lt;p&gt;Hi Mr. Einar.&lt;/p&gt;
&lt;p&gt;I tried the same code on test board nRF52 DK adding the parameter on the .overlay file (/delete-property/ gpio-as-nreset;) but when I cross the MISO pin P0.20 and MOSI pin P0.21 to read the data I send the uC fall down because the pin P0.21 still configurated as reset.&lt;/p&gt;
&lt;p&gt;About the &amp;amp;spim description in overlay file for the &amp;amp;spi0 also has the same parameters but this works fine.&lt;/p&gt;
&lt;p&gt;Could you provide another soultion or explain better how configure the parameters for &amp;amp;spim2?&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/509198?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 08:13:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:387d9055-9220-4754-876f-425938c13fff</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see. With that using the P0.21 should be OK as long as you have done a recover/erase all to clear the UICR (you can always read back the &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/uicr.html#register.PSELRESET-0"&gt;PSELRESET&lt;/a&gt;&amp;nbsp;registers from a debugger to verify that it is the case). However, the overlay file does not properly describe the spim instance used for the external memory? You would want something similar to what is shown in &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/8dc3f856229ce083c956aa301c31a23e65bd8cd8/samples/drivers/jesd216/boards/nrf52840dk_nrf52840_spi.overlay"&gt;this file&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/509085?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 10:46:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0369862-ba18-4ecf-b993-db1a46b7f480</guid><dc:creator>SBou</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is the overlay text file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.

// You can also use the buttons in the sidebar to perform actions on nodes.
// Actions currently available include:

// * Enabling / disabling the node
// * Adding the bus to a bus
// * Removing the node
// * Connecting ADC channels

// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
// You can also visit the nRF DeviceTree extension documentation at https://nrfconnect.github.io/vscode-nrf-connect/devicetree/nrfdevicetree.html

&amp;amp;spi0 {
    status = &amp;quot;okay&amp;quot;;
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
};

&amp;amp;spi1 {
    status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;spi2 {
	status = &amp;quot;okay&amp;quot;;
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
};

&amp;amp;i2c1 {
    status = &amp;quot;okay&amp;quot;;
    compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
};

&amp;amp;i2c0 {
    status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;flash0 {
	partitions {
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;
		compatible = &amp;quot;fixed-partitions&amp;quot;;

		
		/* Set 3Kb of storage at the end of the of 2Mb flash 0 */
		/*
		storage_partition: partition@f8000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0xf8000 DT_SIZE_K(3)&amp;gt;;
		};
		*/
	};
};

&amp;amp;power {
    status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;uart0_sleep {
    group1 {
        psels = &amp;lt;NRF_PSEL(UART_TX, 0, 6)&amp;gt;, &amp;lt;NRF_PSEL(UART_CTS, 0, 7)&amp;gt;;
    };
};

&amp;amp;uart0_default {
    group1 {
        psels = &amp;lt;NRF_PSEL(UART_TX, 0, 6)&amp;gt;, &amp;lt;NRF_PSEL(UART_CTS, 0, 7)&amp;gt;;
    };
};

&amp;amp;uicr {
    /delete-property/ gpio-as-nreset;
    status = &amp;quot;okay&amp;quot;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And still not works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/509073?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 10:04:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:699ce68b-b2af-44ce-a0bc-1092bd0eacc6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The DK devicetree files will by default configure the pin as a reset pin. As you are using the the DK files with an overlay, you need to also then delete the gpio-as-nreset property as shown in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/106015/use-reset-pin-as-gpio---nrf52840/457188"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/509066?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 09:37:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03220e3d-ea90-4ae6-9ff2-3fc90dc65539</guid><dc:creator>SBou</dc:creator><description>&lt;p&gt;Hi Einar, thanks for your support.&lt;/p&gt;
&lt;p&gt;This is the devitree:&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/pastedimage1730798964754v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The P0.21 hasn&amp;#39;t any assignament.&lt;/p&gt;
&lt;p&gt;This is the Kconfig file and doesn&amp;#39;t has the&amp;nbsp;&lt;span&gt;CONFIG_GPIO_AS_PINRESET.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;source &amp;quot;Kconfig.zephyr&amp;quot;

menu &amp;quot;Proxximos Anchor Kconfig&amp;quot;

config CONNECTION_IDLE_TIMEOUT
	int &amp;quot;Time to be waited for a station to connect&amp;quot;
	default 30

config SSID
	string &amp;quot;SSID&amp;quot;
	help
		Specify the SSID to connect

choice KEY_MGMT_SELECT
	prompt &amp;quot;Security Option&amp;quot;
	default KEY_MGMT_WPA2

config KEY_MGMT_NONE
	bool &amp;quot;Open Security&amp;quot;
	help
	  Enable for Open Security

config KEY_MGMT_WPA2
	bool &amp;quot;WPA2 Security&amp;quot;
	help
	  Enable for WPA2 Security
endchoice

config PASSWORD
	string &amp;quot;Passphrase (WPA2) or password (WPA3)&amp;quot;
	help
	  Specify the Password to connect

config BUILD_DFU
	bool &amp;quot;Include DFU Configuration on the project&amp;quot;
	default n

if ARM_MPU
config MPU_ALLOW_FLASH_WRITE
	def_bool y
endif

endmenu&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Normaly I use VS Code for programming and the Softreset is enabled on settings.&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/pastedimage1730799371583v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash MEM through SPI not response</title><link>https://devzone.nordicsemi.com/thread/508954?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2024 13:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0b1e986-80e6-4e8b-bfb4-5dd483be61e4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I suspect that pin 0.21 is still configured as a reset pin.&amp;nbsp;The default behaviour of the SoC is for the pin to be used as a GPIO, but several tools will default to configuring it as a reset pin in the UICR.&lt;/p&gt;
&lt;p&gt;First of all, make sure you define it as a GPIO (or not a reset pin) in the devicetree. The Kconfig option CONFIG_GPIO_AS_PINRESET which had the same purpose is no longer used. This &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/106015/use-reset-pin-as-gpio---nrf52840/457188"&gt;this post&lt;/a&gt; for more details on that.&lt;/p&gt;
&lt;p&gt;Secondly, when you program with west from the command line or nRF Connect from VS Code, the default behaviour is also to enable pin reset at that stage. To avoid that, make sure to append &amp;quot;--softreset&amp;quot; if programming directly from west. And if programming from VS Code, make sure to edit the settings and enable. SoftReset. I prefer to search for the settings and then find the check-box that way:&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/pastedimage1730725846184v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>