<?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>nrf5340 bluetooth task triggered by interrupt 58?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99856/nrf5340-bluetooth-task-triggered-by-interrupt-58</link><description>Hello, 
 I am trying to solve an application problem i have. 
 We have an ADC frontend, which gives a dataready interrupt every 1 mSec. 
 I have seen that we are sometimes to late reading out the ADC frontend, due to the high priority task of &amp;#39;Bluetooth</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Jun 2023 07:57:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99856/nrf5340-bluetooth-task-triggered-by-interrupt-58" /><item><title>RE: nrf5340 bluetooth task triggered by interrupt 58?</title><link>https://devzone.nordicsemi.com/thread/433614?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 07:57:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:635d703d-60f0-4e06-8cf9-6b5bf71f70ec</guid><dc:creator>reneTrumpet</dc:creator><description>&lt;p&gt;Hello Jonathan,&lt;/p&gt;
&lt;p&gt;Thanks for your helpful answer!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1h430jed20"&gt;Question1&lt;/h2&gt;
&lt;p&gt;Can you direct my to an example using ppi rtc and spi? (or is it the DPPI for nrf5340).&lt;/p&gt;
&lt;p&gt;The task to perform:&lt;br /&gt;- when the ADC interrupt occurs:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; - send 9 bytes over SPIbus and store the 9 received bytes in a given memory location.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; - some mechanism? (pol/interrupt) to know if above task is ready.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1h430mcca1"&gt;Answer1 :&amp;nbsp;regarding timing&amp;nbsp;question:&lt;/h2&gt;
&lt;p&gt;I understand your question: the picture from segger doesn&amp;#39;t show the bad scenario indeed. The included sysview picture shows a correct ADC readout.&lt;/p&gt;
&lt;p&gt;We saw with a logic analyzer that we where sometimes to late reading out the ADC data using spi.&lt;/p&gt;
&lt;p&gt;To investigate this problem further, we connected the segger sysview. This made clear that there was a higher priority interrupt and task which could intervene our ADC readout task. Unfortunately we dont have a segger capture picture which shows late adc readout situation.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1h432b3dv2"&gt;Details about ADC readout&lt;/h2&gt;
&lt;p&gt;The ADC sampling is completely standalone, it gives us an interrupt (ADS1292 DRDY line) if it has a new sample.&amp;nbsp; We react on this interrupt @4, and start a workitem to readout the adc using spi.&lt;/p&gt;
&lt;p&gt;Below you see a picture from the datasheet showing the interrupt DRDY followed by a spi data readout.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2023_2D00_06_2D00_29-09_5F00_11_5F00_12_2D00_ADS129x-Low_2D00_Power_2C00_-2_2D00_Channel_2C00_-24_2D00_Bit-Analog-Front_2D00_End-for-Biopotential-Measureme.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Ren&amp;eacute;&lt;/p&gt;
&lt;div id="gtx-anchor" style="height:20px;left:187.062px;position:absolute;top:268.013px;width:45.0125px;"&gt;&lt;/div&gt;
&lt;div class="jfk-bubble gtx-bubble" style="left:195px;top:298px;"&gt;
&lt;div id="bubble-7" class="jfk-bubble-content-id"&gt;
&lt;div id="gtx-host" style="max-width:400px;"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="jfk-bubble-closebtn-id jfk-bubble-closebtn"&gt;&lt;/div&gt;
&lt;div class="jfk-bubble-arrow-id jfk-bubble-arrow jfk-bubble-arrowup" style="left:201.562px;"&gt;
&lt;div class="jfk-bubble-arrowimplbefore"&gt;&lt;/div&gt;
&lt;div class="jfk-bubble-arrowimplafter"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 bluetooth task triggered by interrupt 58?</title><link>https://devzone.nordicsemi.com/thread/433441?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 11:29:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d6dec6e-a661-4d27-8b50-da7e41352ea1</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Thanks for explain a bit more, this does clear up a few things for me.&amp;nbsp;&lt;/p&gt;
[quote user="reneTrumpet"]I don&amp;#39;t have experience with PPI, but can this be used in conjunction with SPI?[/quote]
&lt;p&gt;You can use PPI together with the RTC to schedule the SPI transfer. This should then uphold the timing and fix the issue.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="reneTrumpet"]art a SPI DMA transfer when we get the adc interrupt and setup readout the data on DMA completion.[/quote]
&lt;p&gt;This might work but I am not 100% sure if it will fully solve the issue.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One curiosity that I have:&lt;br /&gt;How do you know that the delay is happening, it seems like the time shown inn the image that you shared from Sysview that there is &amp;quot;enough&amp;quot; time between the 1ms so that even it the task is a bit delayed it should still be able to read the buffer before 1mS has passed and the buffer has ben overwritten.&amp;nbsp; Is the ADC sampling triggered by the CSN pin goes low or the SPI transaction?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 bluetooth task triggered by interrupt 58?</title><link>https://devzone.nordicsemi.com/thread/433376?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 07:43:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:691c57cf-717d-43f6-9e96-21813fc50037</guid><dc:creator>reneTrumpet</dc:creator><description>&lt;p&gt;Hello Jonathan,&lt;/p&gt;
&lt;p&gt;I appreciate you are still busy with this issue, thanks for that:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I talked about an ADC but acually this i an ecg front end chip ads1292 (which internally has an ADC).&lt;/p&gt;
&lt;p&gt;Unfortunately, this ecg chip has a buffer of 1 sample only, and this also gives the problem.&lt;/p&gt;
&lt;p&gt;We have to read it (using spi) before it presents the next sample (it outputs every 1mSec).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have experience with PPI, but can this be used in conjunction with SPI?&lt;/p&gt;
&lt;p&gt;Maybe another workaround could be (then the processor is offloaded): start a SPI DMA transfer when we get the adc interrupt and setup readout the data on DMA completion.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ren&amp;eacute;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 bluetooth task triggered by interrupt 58?</title><link>https://devzone.nordicsemi.com/thread/433290?ContentTypeID=1</link><pubDate>Tue, 27 Jun 2023 14:21:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2684b47-a3eb-495f-8356-cf4506f17926</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;René, just want to give some life sign, still checking on this but have not found any &lt;span style="font-size:12px;"&gt;enlighten&lt;/span&gt;&amp;nbsp;&lt;span style="font-size:12px;"&gt;details&lt;/span&gt;&amp;nbsp;that I can share for now.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Since this is the dual core SoC you should have full access on the app core so i do find it a bit strange the issue that you have.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;How large is the ADC buffer, and can you increase it?&lt;br /&gt;&lt;br /&gt;Are you using PPI, this will improve timing.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 bluetooth task triggered by interrupt 58?</title><link>https://devzone.nordicsemi.com/thread/426746?ContentTypeID=1</link><pubDate>Tue, 23 May 2023 06:20:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84286812-601f-44e9-af04-8c965fba09f5</guid><dc:creator>reneTrumpet</dc:creator><description>&lt;p&gt;Hello Jonathan,&lt;/p&gt;
&lt;p&gt;Thanks for your answer. I hope that you can help us, since we are a little stuck at this moment.&lt;/p&gt;
&lt;p&gt;Regards, Ren&amp;eacute;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 bluetooth task triggered by interrupt 58?</title><link>https://devzone.nordicsemi.com/thread/426631?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 14:34:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe19c62b-8de2-4875-b55a-e8863330defc</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I will ask internally if this is info we comment on. &amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 bluetooth task triggered by interrupt 58?</title><link>https://devzone.nordicsemi.com/thread/426259?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 11:41:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c171ede-71a1-4980-8709-72199e8b318c</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;I am sorry, but we are short staffed this week due to Public Holidays in Norway. We will be back on Monday 22nd and hope to be able to answer all incoming requests within a couple of days, depending on the backlog. I am sorry for the inconvenience.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>