<?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>Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88080/minimum-time-delay-between-tasks_start-and-tasks_stop-suspend-for-ppi</link><description>Hello, 
 I am reading the FIFO buffer of a sensor via SPIM3 with nRF52840. What I want to do is that by the use of PPI, the start of the transmission (PPI channel 0, to TASKS_START / RESUME) is triggered by an event and also TASKS_SUSPEND (PPI Channel</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Jun 2022 10:32:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88080/minimum-time-delay-between-tasks_start-and-tasks_stop-suspend-for-ppi" /><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/372084?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2022 10:32:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:472088f5-217b-49a9-bc1a-e3e66df92eee</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Henrike&lt;/p&gt;
&lt;p&gt;The hardware guys confirmed my suspicion. Below is the full reply:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;Yes, triggering TASKS_RESUME before TASKS_START won&amp;#39;t have any effect. TASKS_RESUME will only have an effect after a TASKS_SUSPEND when a transaction is currently ongoing.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;br /&gt;Torbjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/369747?ContentTypeID=1</link><pubDate>Fri, 27 May 2022 10:29:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f574e57-774c-44fc-a1d3-b84b41dc1e06</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Henrike&lt;/p&gt;
&lt;p&gt;I am pretty sure the RESUME task will simply be ignored if you haven&amp;#39;t started a transaction yet, but I have asked the hardware team for a confirmation regarding this. As soon as I hear back from them I will let you know.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/369194?ContentTypeID=1</link><pubDate>Tue, 24 May 2022 07:56:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85fa559d-494f-472d-a2d8-61d1553f2294</guid><dc:creator>lora</dc:creator><description>&lt;p&gt;Okay, I&amp;#39;m afraid that&amp;#39;s not possible. But I will think of options. Maybe I can trigger the SPI START manually, and only have the RESUME as an event of the rising edge of a pin (and SUSPEND for another pin).&lt;/p&gt;
&lt;p&gt;What happens, though, when the RESUME event is triggered while no START has been done, i.e. no SPI transmission is ongoing ? Is it simply discarded (desired for me here)? Or will it be taken into account as soon a transmission has started or suspended later? Is this tested?&lt;/p&gt;
&lt;p&gt;Thank you! Best regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/369182?ContentTypeID=1</link><pubDate>Tue, 24 May 2022 07:30:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2ef14ee-5915-49f4-a91d-7d489db708e2</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Henrike&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t realize that you trigger several SPI tasks at the same time. This is not tested, and could have unpredictable consequences.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should try to trigger START, SUSPEND and RESUME separately, like I do in my example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is possible to set up separate events on the falling and rising edge of the interrupt pin, in case this makes it easier?&lt;br /&gt;You just need to configure two GPIOTE IN channels on the same pin.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/369035?ContentTypeID=1</link><pubDate>Mon, 23 May 2022 12:57:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f7c648d-1c04-483c-ba5e-82457440e49f</guid><dc:creator>lora</dc:creator><description>&lt;p&gt;When I do not do the Fork, then the suspend is triggered: the CS pin stays low but the clock stops toggling.&lt;/p&gt;
&lt;p&gt;So I actually seem to have a problem with the resume now rather than with the suspend.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/369033?ContentTypeID=1</link><pubDate>Mon, 23 May 2022 12:51:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e908e593-4601-4117-815e-728817b9db8e</guid><dc:creator>lora</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;thank you for your example! I see that you took two different PPI channels for TASK_START and TASK_RESUME, triggered by different events.&lt;/p&gt;
&lt;p&gt;For me, I have only one event that should in the first run start the SPI transmission and then, after a suspend, should resume it. It&amp;#39;s the same event. That&amp;#39;s why I forked the PPI channel 0 to do both, START and RESUME.&lt;/p&gt;
&lt;p&gt;Is this maybe a problem?&amp;nbsp; That maybe the SUSPEND is directly cut off by the RESUME which was not triggered in the first run (because START was triggered instead)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/369001?ContentTypeID=1</link><pubDate>Mon, 23 May 2022 11:47:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9b0313f-f535-4867-9e0b-757897dbc1f3</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Henrike&lt;/p&gt;
&lt;p&gt;I did my own little test to verify that the suspend functionality of the SPIM3 module works as expected, and I had no problems suspending the SPI after the first byte was transmitted, and resuming it again some time later:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/289295_5F00_blinky_5F00_spim3_5F00_test.zip"&gt;devzone.nordicsemi.com/.../289295_5F00_blinky_5F00_spim3_5F00_test.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see from the code I suspend the SPI 2 microseconds after it starts, and then I resume it 20 microseconds after. I verified the result on the scope:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/scope_5F00_6.jpg" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Are you sure that the pin events are actually received properly in your firmware, so that the SPIM tasks get activated properly?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/368885?ContentTypeID=1</link><pubDate>Sat, 21 May 2022 12:12:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fcdb717-f939-4bb9-aef1-a77c5b8bbd5b</guid><dc:creator>lora</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn, thanks for the response.&lt;/p&gt;
&lt;p&gt;The second event which should trigger the suspend or stop only occurs as soon when the FIFO undergoes a certain watermark. Thus, when the event appears I can be quite sure that I am not trigggering start/resume and suspend/stop within the same byte but that at least one byte must have been read from the FIFO.&lt;/p&gt;
&lt;p&gt;I also attached two pictures which show the same situation (I only have a 4 Channel logic analyzer thats why it is 2 pictures). On the first picture one can see both INT1 and INT2 which are to trigger the tasks both on a rising edge - INT1 should start the SPI, which it obvously does, since the Clock starts and the CS pin goes down, and the INT2 rising edge should suspend it. On the second picture one can see the MISO pin and thus the reading of the bytes, and also that INT2 has the rising edge after one byte has been read.&lt;/p&gt;
&lt;p&gt;This is how I verify that the suspend is not working - despite the rising edge of INT2 the clock keeps toggling and we still read bytes.&lt;/p&gt;
&lt;p&gt;The frequency on the bus is 8Mbps, but also with 4Mbps it is not working.&lt;/p&gt;
&lt;p&gt;Do you have any ideas here?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/800x600/__key/communityserver-discussions-components-files/4/cap_5F00_ClkInt1Int2CS_5F00_8MHz_5F00_LI.jpg" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/800x600/__key/communityserver-discussions-components-files/4/cap_5F00_ClkMISOInt2CS_5F00_8MHz.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Minimum Time Delay between TASKS_START and TASKS_STOP/SUSPEND for PPI ?</title><link>https://devzone.nordicsemi.com/thread/368714?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 06:45:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bf8196b-c972-48d1-8575-ca0954e1c997</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Henrike&lt;/p&gt;
&lt;p&gt;I am not aware of any such minimum delay, but a suspend or stop task will not be effective until the current byte is transmitted successfully. Is there any chance you are triggering multiple start/stop/resume/suspend tasks within the same byte?&lt;/p&gt;
&lt;p&gt;What is the frequency you use on the SPI bus, and how fast are you activating these tasks?&lt;/p&gt;
&lt;p&gt;How do you verify that the suspend is not working?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>