<?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>nRF52 SPI Master - Interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16978/nrf52-spi-master---interrupt</link><description>Hi, 
 I&amp;#39;m using the nRF52 as a master and an external RF chip as a slave. After configuring my spi bus using nrf_drv_spi_init(&amp;amp;spi, NULL, NULL), in my main loop, how do I get an interrupt to know if the slave is going send data over so I can read the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Oct 2016 08:07:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16978/nrf52-spi-master---interrupt" /><item><title>RE: nRF52 SPI Master - Interrupt</title><link>https://devzone.nordicsemi.com/thread/65122?ContentTypeID=1</link><pubDate>Tue, 11 Oct 2016 08:07:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52465bf6-eea8-46da-b5b5-3cfba9bada3c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is not possible for a SPI slave to initiate a transfer, only the SPI master can do that. If you want your slave device to indicate to the master that it has data to send, you must add an interrupt to the master using &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__nrf__gpio.html?cp=4_0_0_6_6_7"&gt;GPIO&lt;/a&gt;/&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__nrf__gpiote.html?cp=4_0_0_6_6_4"&gt;GPIOTE&lt;/a&gt; interrupts.&lt;/p&gt;
&lt;p&gt;When the transfer initiated by the master is finished you will get a &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__nrf__drv__spi.html#ga352b9d6bd09a8bdf5bafe6e756cc5d50"&gt;NRF_DRV_SPI_EVENT_DONE&lt;/a&gt; event in your SPI event handler. This can be used to set a flag to indicate that the receive register can be read. See example of this in &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/spi_master_example.html?cp=4_0_0_4_5_28"&gt;SPI master example&lt;/a&gt; in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>