<?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>Periodic SPI reads in TF-M secure partition</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114944/periodic-spi-reads-in-tf-m-secure-partition</link><description>I&amp;#39;ve been investigating the &amp;quot;TF-M secure peripheral partition&amp;quot; sample project ( nRF5340DK, NCS v2.5.0, nrf/samples/tfm/tfm_secure_peripheral ) and testing if it would be possible to connect the SPI peripheral (in secure partition) to a sensor and read</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Sep 2024 07:53:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114944/periodic-spi-reads-in-tf-m-secure-partition" /><item><title>RE: Periodic SPI reads in TF-M secure partition</title><link>https://devzone.nordicsemi.com/thread/504102?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 07:53:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebc801d8-23cd-4171-b950-6573436ad1af</guid><dc:creator>afok-esmart</dc:creator><description>&lt;p&gt;(OP replying) For approach #2, I was able to get it&amp;nbsp;working by making sure the main thread i.e., main() never returned/exited by using an infinite while loop with a short delay inside.&lt;/p&gt;
&lt;p&gt;My guess is that, without the main thread, the work item handler gets executed in the idle thread or some other low-priority thread (which may not be running frequent enough). Could be related to &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.5.0/page/zephyr/kernel/services/interrupts.html#offloading_isr_work"&gt;how, &amp;quot;depending on the priority of the thread handling the offload (computation from an ISR), the ... other higher-priority threads may execute before (it) ... is scheduled&amp;quot;&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Periodic SPI reads in TF-M secure partition</title><link>https://devzone.nordicsemi.com/thread/504099?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 07:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8164e922-5910-4999-a5b4-72a1d2a937b0</guid><dc:creator>afok-esmart</dc:creator><description>&lt;p&gt;Thank you for the suggestions. I&amp;#39;ll give them a try a little later. So far I&amp;#39;ve had more progress when having it in non-secure partition (will post separate reply regarding this), but may need to revisit having it in secure partition.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Periodic SPI reads in TF-M secure partition</title><link>https://devzone.nordicsemi.com/thread/504061?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2024 20:15:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c186064e-c383-46e3-a236-ecb63903cf4c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;What exactly are you doing in the interrupt when you have it in secure mode? It is not very clear from the message.&lt;/p&gt;
&lt;p&gt;Can you maybe try to delay the SPI reading after cold boot to rule out the possibility that you try to use uninitialized services?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Can you try to use Debugging to step through the secure partition code?&amp;nbsp;I can&amp;#39;t promise that this will show what goes wrong, but it is worth a try.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Periodic SPI reads in TF-M secure partition</title><link>https://devzone.nordicsemi.com/thread/503643?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2024 22:26:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac460a6c-26ef-46b4-bfc1-318e2b8308f1</guid><dc:creator>afok-esmart</dc:creator><description>&lt;p&gt;Sounds good, thank you. Please also note my update to the original post (edit #1) when you get the chance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Periodic SPI reads in TF-M secure partition</title><link>https://devzone.nordicsemi.com/thread/503635?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2024 19:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5537d53d-3308-45c6-a79e-7996e78342d8</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am working on your case and will update it later when I collect enough information.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>