<?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 SPI to communicate with L6470 and nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105318/using-spi-to-communicate-with-l6470-and-nrf52832</link><description>Hello, 
 
 I previously posted that I had issues working with communicating with the L6470 stepper driver from ST Micro using the nRF52832. 
 https://devzone.nordicsemi.com/f/nordic-q-a/104750/struggling-with-spi-on-nrf52832-communicating-with-l6470 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Nov 2023 14:46:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105318/using-spi-to-communicate-with-l6470-and-nrf52832" /><item><title>RE: Using SPI to communicate with L6470 and nRF52832</title><link>https://devzone.nordicsemi.com/thread/454508?ContentTypeID=1</link><pubDate>Tue, 07 Nov 2023 14:46:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe58d052-81b1-4b8e-8697-a6b92968f0b2</guid><dc:creator>jablackann</dc:creator><description>&lt;p&gt;So i am not exactly sure what is the problem but in l6470.c file for the init it had the following&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define L64X0_INIT(n)							\
	static const struct l64x0_config l64x0_cfg_##n = {		\
		.spi = SPI_DT_SPEC_INST_GET(n,				\
					    SPI_OP_MODE_MASTER |	\
					    SPI_MODE_CPOL | 		\
					    SPI_MODE_CPHA |		\
					    SPI_TRANSFER_MSB |		\
					    SPI_WORD_SET(8) |		\
					    SPI_LOCK_ON,		\
					    0),				\
	};								\
									\
	DEVICE_DT_INST_DEFINE(n,					\
			      &amp;amp;l64x0_init,				\
			      NULL,					\
			      NULL,					\
			      &amp;amp;l64x0_cfg_##n,				\
			      POST_KERNEL,				\
			      0,					\
			      NULL);

DT_INST_FOREACH_STATUS_OKAY(L64X0_INIT)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I changed it to the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define L64X0_INIT(n)							\
	static const struct l64x0_config l64x0_cfg_##n = {		\
		.spi = SPI_DT_SPEC_INST_GET(n,				\
					    SPI_OP_MODE_MASTER |	\
					    SPI_MODE_CPOL | 		\
					    SPI_MODE_CPHA |		\
					    SPI_TRANSFER_MSB |		\
					    SPI_WORD_SET(8) |		\
					    SPI_LOCK_ON,		\
					    0),				\
	};								\
									\
	DEVICE_DT_INST_DEFINE(n,					\
			      &amp;amp;l64x0_init,				\
			      NULL,					\
			      NULL,					\
			      &amp;amp;l64x0_cfg_##n,				\
			      POST_KERNEL,				\
			      90,					\
			      NULL);

DT_INST_FOREACH_STATUS_OKAY(L64X0_INIT)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Changing the the parameter after POST_KERNEL from a 0 to 90.&amp;nbsp; I don&amp;#39;t know what that values represents.&amp;nbsp; The code then builds and will run on the nRF52832. &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/l6470.c"&gt;devzone.nordicsemi.com/.../l6470.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SPI to communicate with L6470 and nRF52832</title><link>https://devzone.nordicsemi.com/thread/454505?ContentTypeID=1</link><pubDate>Tue, 07 Nov 2023 14:39:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:610fc024-b2c9-4e8d-be8d-31233b0a7a55</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Here is an SPI sample. Perhaps you could compare this one with your own one?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/too1/ncs-spi-master-slave-example/blob/master/nrf52dk_nrf52832.overlay"&gt;https://github.com/too1/ncs-spi-master-slave-example/blob/master/nrf52dk_nrf52832.overlay&lt;/a&gt; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SPI to communicate with L6470 and nRF52832</title><link>https://devzone.nordicsemi.com/thread/454017?ContentTypeID=1</link><pubDate>Fri, 03 Nov 2023 15:11:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:547e4913-6b74-45f2-a3a6-051b939e6fff</guid><dc:creator>jablackann</dc:creator><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;Thanks for the suggestion.&amp;nbsp; I tried switching it to the SPI2 but I don&amp;#39;t think that worked either.&lt;/p&gt;
&lt;p&gt;Now it reports the following&lt;/p&gt;
&lt;p&gt;-edt-pickle C:/code/009-Nordic-projects/nrfconnect/spi_L6470_ncs_2_5_0/spi_l6470/build/zephyr/edt.pickle&amp;quot;&amp;quot;&lt;br /&gt;Memory region&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used Size&amp;nbsp; Region Size&amp;nbsp; %age Used&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASH:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28972 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 512 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.53%&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RAM:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5900 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.00%&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDT_LIST:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 GB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00%&lt;br /&gt;ERROR: /soc/spi@40023000/l6470@0 POST_KERNEL 0 108 &amp;lt; /soc/spi@40023000 POST_KERNEL 70 107&lt;br /&gt;ninja: build stopped: subcommand failed.&lt;br /&gt;FATAL ERROR: command exited with status 1: &amp;#39;C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;c:\code\009-Nordic-projects\nrfconnect\spi_L6470_ncs_2_5_0\spi_l6470\build&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SPI to communicate with L6470 and nRF52832</title><link>https://devzone.nordicsemi.com/thread/454008?ContentTypeID=1</link><pubDate>Fri, 03 Nov 2023 14:44:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f00326ca-2423-40fc-afe9-986b76e6492d</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I will look into this after the weekend. In the meantime, you could perhaps check if changing from &amp;#39;spi1&amp;#39; to for example &amp;#39;spi2&amp;#39; makes any difference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>