<?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>In the implementation of PWM control function, two instances cannot be created</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84294/in-the-implementation-of-pwm-control-function-two-instances-cannot-be-created</link><description>Thank you very much for your help. I am currently working on implementing a PWM control function using the nrf52840. I would like to ask you about a build error that occurred in that case. In order to implement three different implementations of the PWM</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Feb 2022 08:11:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84294/in-the-implementation-of-pwm-control-function-two-instances-cannot-be-created" /><item><title>RE: In the implementation of PWM control function, two instances cannot be created</title><link>https://devzone.nordicsemi.com/thread/351461?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 08:11:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1792d6ca-c8c4-441f-9c59-60ca4e358d66</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Glad to hear we found the cause of this first issue at least.&lt;/p&gt;
&lt;p&gt;Are you working on a development kit or a custom board here? I don&amp;#39;t see why the duty cycle set for your LEDs should only affect one of them. How do you enable the working LEDs exactly versus how you&amp;#39;re enabling the problematic one?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In the implementation of PWM control function, two instances cannot be created</title><link>https://devzone.nordicsemi.com/thread/351222?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 03:54:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0063943a-f641-4236-a523-862d32f02c30</guid><dc:creator>LemonCake</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app_pwm_channel_duty_set(&amp;amp;PWM0, 0, duty_ratio);
app_pwm_channel_duty_set(&amp;amp;PWM1, 0, duty_ratio); &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much for your answer. From your answer, I changed TIMER2 to TIMER3 and changed &amp;quot;NRFX_TIMER3_ENABLED&amp;quot; and &amp;quot;TIMER3_ENABLED&amp;quot; in app_config.h. and created the second instance. Then the error disappeared and the build succeeded. When I set the duty ratio for the two LED channels as in the first program, the duty ratio changed only for one LED and not for the other.&lt;br /&gt;By the way, the LED whose duty ratio did not change is enabled by using &amp;quot;pwm_utils_enable()&amp;quot; as initialization process. If this function is set for multiple LEDs, both LEDs will not light up, so it is not possible to set the same function for multiple LEDs.&lt;br /&gt;If you have any suggestions on how to fix this, please let me know.&lt;br /&gt;Thank you very much.&lt;/p&gt;
&lt;p style="text-align:right;"&gt;LemonCake&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In the implementation of PWM control function, two instances cannot be created</title><link>https://devzone.nordicsemi.com/thread/350873?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 12:41:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5854c8a1-879f-491d-bcc3-124598463d2a</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;From the &amp;quot;multiple definition&amp;quot; error message you&amp;#39;re seeing it seems like you&amp;#39;re trying to use the TIMER2 instance multiple times in your application. I think the Mesh stack uses this timer instance already, so trying to add it in your application is likely what&amp;#39;s causing this issue. Since you&amp;#39;re working on the nRF52840, there should be more than enough TIMER instances (5) to go around, so try using another one for your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>