<?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>Using PPI to periodically pass memory to hardware peripherals (specifically PWM)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47397/using-ppi-to-periodically-pass-memory-to-hardware-peripherals-specifically-pwm</link><description>Is it possible to pass a memory location to PWM (preferably via DMA) via PPI. This is a sound project and my intent is to update two 8 bit PWM outputs at 44.1kHz. I typically do this with interrupts in a bare metal application. But I do not believe this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 May 2019 16:48:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47397/using-ppi-to-periodically-pass-memory-to-hardware-peripherals-specifically-pwm" /><item><title>RE: Using PPI to periodically pass memory to hardware peripherals (specifically PWM)</title><link>https://devzone.nordicsemi.com/thread/188358?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 16:48:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b14c1e3-a3a1-4561-9636-c41b97b5aa13</guid><dc:creator>icanhazscreenid</dc:creator><description>&lt;p&gt;Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Perfect!&amp;nbsp;This is exactly the information I wanted. Thank you so much for pointing me to the tasks I need to use. I get it now. Thanks for your help!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Ryan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PPI to periodically pass memory to hardware peripherals (specifically PWM)</title><link>https://devzone.nordicsemi.com/thread/188096?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 07:13:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34606b0b-6072-4590-a914-e7e1e1184fc0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. So I assume you are using the PWM peripheral, then, which is the one used in the pwm_driver example, and &lt;strong&gt;not&lt;/strong&gt; the one used in the pwm_library example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you study the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52810%2Fpwm.html&amp;amp;cp=3_3_0_5_11_4&amp;amp;anchor=topic"&gt;PWM registers on infocenter&lt;/a&gt;, you can see the tasks and events that are present in the PWM peripheral.&lt;/p&gt;
&lt;p&gt;For you, the interresting parts are (N = 0 or 1):&lt;/p&gt;
&lt;p&gt;SEQ[N].PTR&lt;/p&gt;
&lt;p&gt;SEQ[N].CNT&lt;/p&gt;
&lt;p&gt;TASKS_SEQSTART[N]&lt;/p&gt;
&lt;p&gt;TASKS_NEXTSTEP[N]&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So you can use these tasks together with PPI to update the PWM duty cycles. But you need to use the CPU to update SEQ.PTR and CNT, and the actual values. But when these are set, you can iterate through them using the PPI (so without the CPU).&lt;/p&gt;
&lt;p&gt;You need an event that can trigger the PPI. If it needs to be updated every 22µs, then you can use a timer which can generate the events.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PPI to periodically pass memory to hardware peripherals (specifically PWM)</title><link>https://devzone.nordicsemi.com/thread/187990?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 14:08:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa13260b-59bc-429f-887c-cfd92ca50015</guid><dc:creator>icanhazscreenid</dc:creator><description>&lt;p&gt;Hi Edvin. Thanks for your response. I understand how to output a PWM signal using the driver and the library. My question is not &amp;quot;how can I output a PWM signal&amp;quot;. My question is &amp;quot;can I change the PWM output without CPU intervention?&amp;quot; The buffer I am referring to is a page of SPI flash memory consisting of 2048 bytes. My goal, if possible, is to update the PWM outputs every ~22us with the next two values in the flash buffer. I want to use the CPU cycles to read SPI flash and update the buffer; not to update the PWM output.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PPI to periodically pass memory to hardware peripherals (specifically PWM)</title><link>https://devzone.nordicsemi.com/thread/187917?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 12:35:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19fba70c-1889-40c5-8273-11ba9350c3f2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I am a bit confused regarding what you mean with PWM buffer. Maybe you can find something that you can use in the PWM examples? Are you using the PWM driver or the PWM library?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>