<?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>Different polarity at 2 pins when using PWM.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59735/different-polarity-at-2-pins-when-using-pwm</link><description>My platform is SDK16 with softdevice, MCU nRF52840. I used 2 pin to generate PWM at 125KHz for Manchester coding. I want them are at different pin polarity. For example, if the pin_125K_OUT_PLUS at high state and the pin_125K_OUT_MINUS should at low state</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Jun 2020 02:36:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59735/different-polarity-at-2-pins-when-using-pwm" /><item><title>RE: Different polarity at 2 pins when using PWM.</title><link>https://devzone.nordicsemi.com/thread/253667?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 02:36:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f40fe249-4f06-4144-bb95-1922f85bbf9b</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Ted, in passing as I am using differential Manchester encoding myself I see you are using &lt;span&gt;&lt;em&gt;nrf_pwm_values_individual_t&lt;/em&gt;&amp;nbsp;&lt;/span&gt;which requires double the memory of&amp;nbsp;&lt;em&gt;nrf_pwm_values_grouped_t&lt;/em&gt;; the only requirement is that for the latter you map the pins to&amp;nbsp;&lt;em&gt;PSEL.OUT[0]&lt;/em&gt; and&amp;nbsp;&lt;em&gt;PSEL.OUT[2]&lt;/em&gt; instead of&amp;nbsp;&lt;em&gt;PSEL.OUT[0]&lt;/em&gt; and&amp;nbsp;&lt;em&gt;PSEL.OUT[1]&lt;/em&gt;. Worth doing, since I expect you have found that Manchester encoding with differential PWM requires large memory buffers compared with single-ended SPI.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different polarity at 2 pins when using PWM.</title><link>https://devzone.nordicsemi.com/thread/242839?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 06:51:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a1b6590-6f13-4143-85f2-b1342ddccf30</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Ted,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please verify the answer if it can fix the issue. Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different polarity at 2 pins when using PWM.</title><link>https://devzone.nordicsemi.com/thread/242816?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 02:45:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f817740c-36b8-4f02-a011-2ccb56326280</guid><dc:creator>Ted</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/hmolesworth"&gt;hmolesworth&lt;/a&gt;&amp;nbsp;It is OK. I make a mistake. You are right. Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different polarity at 2 pins when using PWM.</title><link>https://devzone.nordicsemi.com/thread/242813?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 01:31:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6974fe9d-d7a6-4fbf-8d13-576c56cba860</guid><dc:creator>Ted</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/hmolesworth"&gt;hmolesworth&lt;/a&gt; I change my code as follows. But the output&amp;nbsp;is still Fig-1. What&amp;#39;s wrong with my program?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;.output_pins =&lt;br /&gt;{pin_125K_OUT_PLUS | NRF_DRV_PWM_PIN_INVERTED,&lt;br /&gt;pin_125K_OUT_MINUS,&lt;br /&gt;},&lt;/p&gt;
&lt;p&gt;or&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;.output_pins =&lt;br /&gt;{&lt;span&gt;pin_125K_OUT_MINUS&lt;/span&gt;| NRF_DRV_PWM_PIN_INVERTED,&lt;br /&gt;&lt;span&gt;pin_125K_OUT_PLUS&amp;nbsp;&lt;/span&gt;,&lt;br /&gt;},&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different polarity at 2 pins when using PWM.</title><link>https://devzone.nordicsemi.com/thread/242766?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 16:16:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06399c2b-a174-4d8b-bf59-b8cf4506b30c</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Both pins are set to the same active state using the above code, simply change one pin by removing&amp;nbsp;&lt;span&gt;NRF_DRV_PWM_PIN_INVERTED&lt;/span&gt; depending on which order you require. In this code snippet PLUS will be active high and MINUS active low:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;.output_pins =
{pin_125K_OUT_PLUS | NRF_DRV_PWM_PIN_INVERTED,
 // pin_125K_OUT_MINUS,
 pin_125K_OUT_MINUS,
},&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>