<?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>SPI speed when using SDHC via SPI in Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72677/spi-speed-when-using-sdhc-via-spi-in-zephyr</link><description>I&amp;#39;m using the Nordic nRF52840-DK board to breadboard an SDHC card interface in Zephyr using SPI. I have it doing &amp;quot;basic&amp;quot; operations, but am trying to reconcile what I&amp;#39;m physically seeing versus what is documented and what I see in the code. 
 I was hoping</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Mar 2021 15:57:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72677/spi-speed-when-using-sdhc-via-spi-in-zephyr" /><item><title>RE: SPI speed when using SDHC via SPI in Zephyr</title><link>https://devzone.nordicsemi.com/thread/299534?ContentTypeID=1</link><pubDate>Fri, 12 Mar 2021 15:57:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1626f86e-8d8c-4a79-830d-3cdf45e388bb</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Yes, that is the github/zephyrproject issue entry.&amp;nbsp; &amp;nbsp; &amp;nbsp;It seems that the Zephyr SPI driver should have characteristics much like the nRF5 SDK driver (where each transaction can have its own configuration, since different peripherals (which may share an SPI instance) have different speed capabilites.&amp;nbsp; &amp;nbsp; This is also true for the TWIM/I2C device driver.)&amp;nbsp; I had to spin my own I2C driver since the Zephyr version doesn&amp;#39;t seem to have the features provided for by the nRF5 SDK Libraries (ability to run TWIM/I2C transactions in the background and get completion interrupts).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI speed when using SDHC via SPI in Zephyr</title><link>https://devzone.nordicsemi.com/thread/299398?ContentTypeID=1</link><pubDate>Fri, 12 Mar 2021 08:24:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cecb43d-96f8-4b31-bb84-4f77b2529c59</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span&gt;But it appears that hardcoded into disk_access_spi_sdhc.c are statements that assign the speed to be 400 KHz during initialization, then 4 MHz for later operations. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But then looking at the waveform captured by a logic analyzer, it appears that the SCK signal is actually running at around 250 KHz. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What am I missing?&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Due to this check, the spim driver does not allow you to reconfigure the frequency after it has been initially set:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/drivers/spi/spi_nrfx_spim.c#L112-L114"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/master/drivers/spi/spi_nrfx_spim.c#L112-L114&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve inputted this as a improvement internally; to allow the spim-port to change frequency.&amp;nbsp;&lt;/p&gt;
[quote user=""]I submitted this as an issue at the Zephyr Git website about a week ago, but there has been no response.&amp;nbsp; &amp;nbsp;I thought I&amp;#39;d also submit here since the underlying hardware is Nordic and I&amp;#39;m using NCS v1.5.0 and the Zephyr code included there...[/quote]
&lt;p&gt;Its this one, right?&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/32996"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/32996&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have added this to the internal jira that I registered.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>