<?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>Bit dazzed on how to stop SPI module in the middle of transaction</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57474/bit-dazzed-on-how-to-stop-spi-module-in-the-middle-of-transaction</link><description>Hi, 
 Good Day! 
 Statement of Problem: We are using SPI to transfer data to custom LED matrix which uses HT1632C led driver. For strings more than 7 character length we used scroll effect to display the message (frames are moved from right to left at</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Feb 2020 14:12:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57474/bit-dazzed-on-how-to-stop-spi-module-in-the-middle-of-transaction" /><item><title>RE: Bit dazzed on how to stop SPI module in the middle of transaction</title><link>https://devzone.nordicsemi.com/thread/233081?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2020 14:12:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ad20a59-5598-48f2-b6fb-bcd2331329fa</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Query: Is it possible to stop the SPI transaction&amp;nbsp; in the middle(especially for this long messages)? so that a new interrupt can be processed. If it possible, how it can be done?&amp;nbsp;[/quote]
&lt;p&gt;Yes, it is possible to abort a transfer. If you use the driver, you can use nrf_drv_spi_abort(). Please note that you should not have any problems handling interrupts in between anyway if you use the SPIM peripheral, since that use DMA for transferring data and only needs the CPU for setting up transfers. So the CPU will be free to do other work while the transaction is ongoing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bit dazzed on how to stop SPI module in the middle of transaction</title><link>https://devzone.nordicsemi.com/thread/233038?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2020 11:59:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbf1af1e-5260-44a6-a0de-22c5aaac4ac5</guid><dc:creator>AimHigh</dc:creator><description>&lt;p&gt;Hi Tubro,&lt;/p&gt;
&lt;p&gt;I can share the source code in private. Can you set this under private mode?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bit dazzed on how to stop SPI module in the middle of transaction</title><link>https://devzone.nordicsemi.com/thread/232985?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2020 09:36:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7df44419-1c66-4475-b064-33e0d24062d5</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="78183" url="~/f/nordic-q-a/57474/bit-dazzed-on-how-to-stop-spi-module-in-the-middle-of-transaction"]that a new interrupt can be processed[/quote]
&lt;p&gt;Interrupts on NRF5x (aka ARM Cortex-M) are &lt;em&gt;preemptible&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So once you set your priorites correctly, the SPI interrupt can be preempted by the app_timer interrupt handler at any time.&lt;/p&gt;
&lt;p&gt;We would need to look at your source code why there is no &amp;quot;long&amp;quot; message displayed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>