<?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>nRF51822 SPI limitations (send/recv from timer)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7871/nrf51822-spi-limitations-send-recv-from-timer</link><description>Hello Everyone, 
 I am trying to use a display (through SPI) in a custom board with nRF51822 and SoftDevice S120. All works great as long as I call the SPI methods from main, and I am able to set up the screen properly and write everything I want in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jun 2015 13:04:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7871/nrf51822-spi-limitations-send-recv-from-timer" /><item><title>RE: nRF51822 SPI limitations (send/recv from timer)</title><link>https://devzone.nordicsemi.com/thread/28074?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2015 13:04:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cca43f4e-3a1f-458a-9072-815e3f415292</guid><dc:creator>muhkuhns</dc:creator><description>&lt;p&gt;I worked around this by just setting a flag when the timer expires and putting my actual code (+unset flag of course) inside an if(flag)-statement inside the main-loop.&lt;/p&gt;
&lt;p&gt;This works fine for me. The cpu can also go to sleep. It checks in the main-loop if the flag is set, if not it goes to sleep. When the timer expires and the flag was set in the timer event handler the flag in the main-loop is checked again and executed and the cpu goes back to sleep again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 SPI limitations (send/recv from timer)</title><link>https://devzone.nordicsemi.com/thread/28075?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2015 12:57:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4c826d0-943d-48c7-9d8e-2261997d7f2b</guid><dc:creator>Krzysztof Chruscinski</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;are you using SPI driver from SDK (if yes then from which version?).&lt;/p&gt;
&lt;p&gt;In general there is no such limitation, only that if you are using SoftDevice from time to time you might get bigger gaps between bytes in the transfer because SPI interrupt has bigger latency (if SoftDevice processes the stack).&lt;/p&gt;
&lt;p&gt;If you have SoftDevice you must ensure that calls to SoftDevice does not happen from application high interrupt level because you will get deadlock (SVC call to SoftDevice on lower priority). SPI driver from SDK is calling softdevice API so it might be the case that your context has too high priority.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>