<?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>nRF5340 SPI frequency setting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65693/nrf5340-spi-frequency-setting</link><description>Hi, 
 
 I&amp;#39;m working on a code using SPI. 
 I&amp;#39;ve changed the SPI configuration from this thread: https://devzone.nordicsemi.com/f/nordic-q-a/65072/nrf5430-spi-sample-code 
 I&amp;#39;ve changed SPI1 to SPI4 (in nrf5340pdk_nrf5340_cpuapp.overlay, prj.conf and main</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Sep 2020 10:09:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65693/nrf5340-spi-frequency-setting" /><item><title>RE: nRF5340 SPI frequency setting</title><link>https://devzone.nordicsemi.com/thread/269814?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2020 10:09:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d81fe658-466a-4581-a54c-953273a91441</guid><dc:creator>MartaOp</dc:creator><description>&lt;p&gt;I&amp;#39;m fine with a workaround for now. Thank you :)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Marta&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI frequency setting</title><link>https://devzone.nordicsemi.com/thread/269813?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2020 10:08:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1159b1da-249f-400e-86b8-a2c6b411758e</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Is it possible to use this workaround? Or would you like me to help you to implement the solution from the master branch?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI frequency setting</title><link>https://devzone.nordicsemi.com/thread/269159?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 12:12:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb33be15-e71a-47cb-ae40-ba533380bb3a</guid><dc:creator>MartaOp</dc:creator><description>&lt;p&gt;Of course when I change if statements directly in the function it all works ;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Marta&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI frequency setting</title><link>https://devzone.nordicsemi.com/thread/269140?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 11:14:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9104408b-3961-4daa-a268-1a9ccb2d5e8d</guid><dc:creator>MartaOp</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not working with v1.3.0 of SDK (the one that still have &lt;span&gt;CONFIG_SOC_NRF52840&lt;/span&gt;), because&amp;nbsp;&lt;span&gt;CONFIG_SOC_NRF5340_CPUAPP&amp;nbsp; is not included and&amp;nbsp;CONFIG_SOC_NRF52833&amp;nbsp;and&amp;nbsp;CONFIG_SOC_NRF52840 are not user-configurable.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I tried to update it to newer version my Segger studio just stopped working at all. After a few reinstallations it&amp;#39;s working again but with the v1.3.0 SDK.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Marta&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI frequency setting</title><link>https://devzone.nordicsemi.com/thread/268861?ContentTypeID=1</link><pubDate>Thu, 10 Sep 2020 07:36:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e53744b6-6d78-4323-b399-c292b0676252</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The reason you&amp;#39;re only getting 8MHz is because of &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.3.0-rc1-ncs1/drivers/spi/spi_nrfx_spim.c#L46"&gt;this function&lt;/a&gt;. If you look inside it, it will only allow high frequencies if either&amp;nbsp;&lt;span&gt;CONFIG_SOC_NRF52833 or&amp;nbsp;CONFIG_SOC_NRF52840 is defined, but according to the documentation nRF5340 should also be here. It seems like this is fixed in the &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/drivers/spi/spi_nrfx_spim.c#L46"&gt;master branch&lt;/a&gt;, where it looks for&amp;nbsp;SPIM_FREQUENCY_FREQUENCY_M32 instead.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I guess you can fix this by either using the master branch or adding CONFIG_SOC_NRF5340_CPUAPP to the function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>