<?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 and RTC Issues within BLE Service Handler on nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118477/spi-and-rtc-issues-within-ble-service-handler-on-nrf52832</link><description>I&amp;#39;m currently working on a project using the nRF52832 as my controller, Segger Embedded Studio version 5.42a as my IDE, and the nRF5 SDK 17.0.2. I started by developing a concurrent central and peripheral switching example project. I&amp;#39;ve added NUS client</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Jan 2025 13:38:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118477/spi-and-rtc-issues-within-ble-service-handler-on-nrf52832" /><item><title>RE: SPI and RTC Issues within BLE Service Handler on nRF52832</title><link>https://devzone.nordicsemi.com/thread/520725?ContentTypeID=1</link><pubDate>Thu, 30 Jan 2025 13:38:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ea4f2b6-2794-4921-a54f-1451fc5950fa</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;First of all, I would advice against using the nRF5 SDK for new product development. It has not been updated for a long time, and the SDK that is recomended now and going forward is the nRF Connect SDK (see &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement"&gt;nRF Connect SDK and nRF5 SDK statement&lt;/a&gt;). And if you still want to use the nRF5 SDK, I would advice that you use the latest, 17.1.0, as that has support for the latest generation of the nRF52 series devices, which are not supported in SDK 17.0.2 and earlier.&lt;/p&gt;
&lt;p&gt;That asside,&lt;/p&gt;
[quote user=""]What&amp;#39;s likely happening here? Do BLE event handlers have a high interrupt priority?[/quote]
&lt;p&gt;Yes, the SoftDevice have high priority Bluetooth interrupts. You can read more about the priority and durations etc under &lt;a href="https://docs.nordicsemi.com/bundle/sds_s132/page/SDS/s1xx/processor_avail_interrupt_latency/processor_avail_interrupt_latency.html"&gt;Interrupt model and processor availability&lt;/a&gt;. It is possible to be allocated time slots where the application is guaranteed no SoftDevice interrupts by using the &lt;a href="https://docs.nordicsemi.com/bundle/sds_s132/page/SDS/s1xx/concurrent_multiprotocol_tsl_api/concurrent_multiprotocol_tsl_api.html"&gt;Timeslot API&lt;/a&gt;&amp;nbsp;if needed.&lt;/p&gt;
[quote user=""]Are peripherals like SPI and RTC excluded from functioning during the execution of these event handlers?[/quote]
&lt;p&gt;No, they are not. The peripherals will continue to function, but related interrupts are not processed before higher lever interrupts have been processed. So in the case of SPI, you want to make sure you are using SPIM (which has DMA) so that the CPU is not needed during the transaction, only for intitating it and processing Rx data after it is done.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>