<?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>nrf52833 SPI Master Mode Changeover</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93208/nrf52833-spi-master-mode-changeover</link><description>I need to set the SPI Mode NRF_DRV_SPI_MODE_0 for a 2nd chip (on the same SCK/MISO/MOSI) to NRF_DRV_SPI_MODE_1.The chipselect is handle by the application. 
 I can&amp;#39;t do the nrf_drv_spi_uninit until the function nrf_drv_spi_init returns an error message</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Oct 2022 12:52:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93208/nrf52833-spi-master-mode-changeover" /><item><title>RE: nrf52833 SPI Master Mode Changeover</title><link>https://devzone.nordicsemi.com/thread/392388?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2022 12:52:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffb268f9-914b-45da-a7fb-901e3e89eb4e</guid><dc:creator>RSchmale</dc:creator><description>&lt;p&gt;Thanks its running now!&lt;/p&gt;
&lt;p&gt;the nrf_spim_configure() was the the function i needed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 SPI Master Mode Changeover</title><link>https://devzone.nordicsemi.com/thread/392363?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2022 11:35:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36229433-c00c-41d3-88bf-6835ff6452ae</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I can&amp;#39;t do the nrf_drv_spi_uninit until the function nrf_drv_spi_init returns an error message &amp;quot;NRF_ERROR_INVALID_STATE&amp;quot;.[/quote]
&lt;p&gt;Not sure if I understand what you are saying here. You should be able to call&amp;nbsp;&lt;span&gt;nrf_drv_spi_uninit() once&amp;nbsp;nrf_drv_spi_init() have returned NRF_SUCCESS.&lt;/span&gt;&lt;/p&gt;
[quote user=""]Is there a function that returns me only the NRFX_DRV_STATE_UNINITIALIZED state?[/quote]
&lt;p&gt;There is no API to get the state of the SPI driver if that is what you are asking. You should be able to remember the state of the driver in your application by setting/clearing a flag once&amp;nbsp;nrf_drv_spi_init/nrf_drv_spi_uninit have been called.&lt;/p&gt;
[quote user=""]Is it possible to change to the mode NRF_DRV_SPI_MODE_1 without calling nrf_drv_spi_init (..) again?[/quote]
&lt;p&gt;There is no API in the driver to change only the SPI mode, but it could possibly be done using the HAL function(s)&amp;nbsp;&lt;a title="nrf_spi_configure" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrf__spi__hal.html?cp=8_1_6_8_0_31_2_6#gaac73a9de5cd7d6bdfb045c905ad4b760"&gt;nrf_spi_configure&lt;/a&gt;()/&lt;a title="nrf_spim_configure" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrf__spim__hal.html?cp=8_1_6_8_0_32_1_11#gaffb80047b5de44762ae77486b591ca03"&gt;nrf_spim_configure&lt;/a&gt;(), if you make sure that any ongoing transfers are completed/aborted first.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>