<?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>nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33442/nrf51-dk-on-mbed-ide-when-one-pwmout-is-enabled-in-my-project-system-crashes</link><description>Hi 
 I am working on nRF51-DK with Mbed IDE &amp;amp; used PWM example code from link : https://os.mbed.com/handbook/PwmOut 
 When enabled PwmOut, PWM signal is observed on the oscilloscope but other pheripherals like UART &amp;amp; all are not working. It seems like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Apr 2018 13:24:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33442/nrf51-dk-on-mbed-ide-when-one-pwmout-is-enabled-in-my-project-system-crashes" /><item><title>RE: nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/thread/129159?ContentTypeID=1</link><pubDate>Fri, 20 Apr 2018 13:24:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f49421a-8048-4473-a282-7e899394a053</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Bharat,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately I have limited knowledge about the Mbed IDE and their ways of doing things.&lt;/p&gt;
&lt;p&gt;I would recommend you to use their &lt;a href="https://os.mbed.com/forum/" target="_blank" rel="noopener noreferrer"&gt;forum.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to use an RTOS I would recommend &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/nrf5x-support-within-the-zephyr-project-rtos" target="_blank" rel="noopener noreferrer"&gt;Zephyr&amp;nbsp;&lt;/a&gt;&amp;nbsp;for your&lt;a href="http://docs.zephyrproject.org/boards/arm/nrf51_pca10028/doc/nrf51_pca10028.html" target="_blank" rel="noopener noreferrer"&gt; nRF51 device&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/thread/129074?ContentTypeID=1</link><pubDate>Fri, 20 Apr 2018 05:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4be15154-6e35-46e9-8b53-58db935481c7</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;For simpification purpose, I have sent you code snippet(Not including UART) for PWM &amp;amp; LED1 which also crashes when PwmOut is enabled.&lt;/p&gt;
&lt;p&gt;Is there any chance to go microcontroller into deep sleep mode when PwmOut is enabled.&lt;/p&gt;
&lt;p&gt;May I know how to wake up microcontroler(nRF51422)&amp;nbsp; from the deep sleep mode on ARM Mbed Compiler ?&lt;/p&gt;
&lt;p&gt;Can I use your PWM&amp;nbsp; library example code on ARM Mbed Compiler&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;Waiting for the reply.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/thread/128986?ContentTypeID=1</link><pubDate>Thu, 19 Apr 2018 13:07:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46effe7a-0238-4f6a-a3ba-2e4ddb711f42</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Bharat,&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What do you mean by the &amp;quot;System&amp;nbsp;&lt;strong&gt;seems&lt;/strong&gt; to be crashed&amp;quot;? Do your device stop working? Error codes?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Is this the code that has the issue or is this the &amp;quot;working&amp;quot; code?&lt;/p&gt;
[quote user=""]but other pheripherals like UART &amp;amp; all&amp;nbsp; are not working.[/quote]
&lt;p&gt;From your code that you posted, you have not initialized UART and such.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I would highly recommend you to use our&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Findex.html&amp;amp;cp=4_0_6" target="_blank" rel="noopener noreferrer"&gt;SDK v12.3&lt;/a&gt;&amp;nbsp;(&lt;em&gt;&lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v12.x.x/"&gt;download link&lt;/a&gt;)&amp;nbsp;&lt;/em&gt;and use the&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Fpwm_example.html"&gt;PWM library example&lt;/a&gt;&amp;nbsp;as reference.&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;You can find the source code and the project file of the example in the following folder:&amp;nbsp;&lt;code&gt;&amp;lt;InstallFolder&amp;gt;\examples\peripheral\pwm_library&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/thread/128883?ContentTypeID=1</link><pubDate>Thu, 19 Apr 2018 05:35:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99cca6dd-1d44-4f33-9498-4cfee3c5cc88</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hello Martin,&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;Yes, system seems to be crashed.&lt;/p&gt;
&lt;p&gt;A pin for PWM doesn&amp;#39;t get used anything else.&lt;/p&gt;
&lt;p&gt;PFB the code snippet.&lt;/p&gt;
&lt;p&gt;When PwmOut is not enabled, LED1 blinks every second but when I enabled the PwmOut , LED1 is not blinking at every second but PWM pulses are observed at Pin P0.16 on oscilloscope.&lt;/p&gt;
&lt;p&gt;Waiting for the reply.&lt;/p&gt;
&lt;div class="row"&gt;
&lt;div class="nine columns main-content" id="mbed-content"&gt;
&lt;div class="q-inner"&gt;
&lt;div class="q-content"&gt;
&lt;div class="row q-dialog answer " id="answer14474"&gt;
&lt;div class="ten columns editcontentitem"&gt;
&lt;div class="comment-container"&gt;
&lt;div class="q-comment"&gt;
&lt;div class="inner"&gt;
&lt;div class="post-container"&gt;
&lt;div class="commentbody"&gt;
&lt;div class="flashbox fcode"&gt;
&lt;table class="codify_table" border="0" cellpadding="0" cellspacing="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="codify_screen"&gt;
&lt;pre&gt;&lt;span class="SH_BUILTIN"&gt;#include&amp;nbsp;&lt;/span&gt;&lt;span class="SH_STRING"&gt;&amp;quot;mbed.h&amp;quot;&lt;/span&gt;
&amp;nbsp;
PwmOut&amp;nbsp;VMPWM(P0_16);&amp;nbsp;&amp;nbsp;&lt;span class="SH_COMMENT"&gt;//P0.16&amp;nbsp;for&amp;nbsp;the&amp;nbsp;PWM&amp;nbsp;&lt;/span&gt;
DigitalOut&amp;nbsp;led1(LED1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="SH_COMMENT"&gt;//&amp;nbsp;P0.21&amp;nbsp;for&amp;nbsp;LED1&lt;/span&gt;
&amp;nbsp;
&lt;span class="SH_RESERVED"&gt;void&lt;/span&gt;&amp;nbsp;periodicCallback(&lt;span class="SH_RESERVED"&gt;void&lt;/span&gt;)&amp;nbsp;{&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;led1&amp;nbsp;=&amp;nbsp;!led1;
}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;
&lt;span class="SH_RESERVED"&gt;int&lt;/span&gt;&amp;nbsp;main(&lt;span class="SH_RESERVED"&gt;void&lt;/span&gt;)&amp;nbsp;{
&amp;nbsp;
VMPWM.period(&lt;span class="SH_NUMBER"&gt;0.01f&lt;/span&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;          &amp;nbsp;&lt;span class="SH_COMMENT"&gt;//&amp;nbsp;10&amp;nbsp;ms&amp;nbsp;period&lt;/span&gt;
VMPWM&amp;nbsp;=&amp;nbsp;&lt;span class="SH_NUMBER"&gt;0.2f&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="SH_COMMENT"&gt;//&amp;nbsp;20&amp;nbsp;%&amp;nbsp;&lt;/span&gt;
&amp;nbsp;
Ticker&amp;nbsp;ticker;
&amp;nbsp;ticker.attach(periodicCallback,&lt;span class="SH_NUMBER"&gt;1&lt;/span&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="SH_COMMENT"&gt;//&amp;nbsp;In&amp;nbsp;Seconds.&amp;nbsp;&lt;/span&gt;
&amp;nbsp;
&lt;span class="SH_RESERVED"&gt;while&lt;/span&gt;(&lt;span class="SH_NUMBER"&gt;1&lt;/span&gt;);
}
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/thread/128842?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 14:11:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e72e6b55-9d1d-43d7-95e3-19bb5edad458</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Bharat,&lt;/p&gt;
[quote user=""] the oscilloscope but other pheripherals like UART &amp;amp; all&amp;nbsp; are not working. It seems like a system is crashed.[/quote]
&lt;p&gt;I need more information from you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Have you chosen a pin for the PWM that doesn&amp;#39;t&amp;nbsp; get used by anything else&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;in the example you sent the LED1 is used, so that could cause an issue&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;- Send me you code&lt;/p&gt;
&lt;p&gt;- How do you know the system crashed, do you have any error codes and such?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/thread/128765?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 09:57:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:707bb92a-1878-4665-b1cf-f370ed508366</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hello Martin,&lt;/p&gt;
&lt;p&gt;Just want to confirm that is this issue related to nRF51-DK or&amp;nbsp; ARM Mbed IDE.&lt;/p&gt;
&lt;p&gt;Waiting for the reply.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/thread/128621?ContentTypeID=1</link><pubDate>Tue, 17 Apr 2018 11:26:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a99e728-62a6-4a7f-b1f8-d301c8078900</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hello Martin Lesund,&lt;/p&gt;
&lt;p&gt;Thanks for the immediate reply.&lt;/p&gt;
&lt;p&gt;Link was given only for PWM related code snippet.&lt;/p&gt;
&lt;p&gt;Can I use PWM library example (SDK v12.3)&amp;nbsp; on ARM Mbed IDE, If yes then can you please send source code for the same as my project is on Mbed IDE only.&lt;/p&gt;
&lt;p&gt;It would be grateful if you suggest to resolve this issue.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat Gopani&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51-DK on Mbed IDE : When one PwmOut is enabled in my project, system crashes.</title><link>https://devzone.nordicsemi.com/thread/128618?ContentTypeID=1</link><pubDate>Tue, 17 Apr 2018 11:12:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eb99efa-7dab-480b-9230-91d4f192b7df</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hello Bharat,&lt;/p&gt;
&lt;p&gt;I am not too familiar with the Mbed IDE, but from the looks of the link you provided only the PWM is initialised.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would highly recommend you to use our &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Findex.html&amp;amp;cp=4_0_6" rel="noopener noreferrer" target="_blank"&gt;SDK v12.3&lt;/a&gt;&amp;nbsp;(&lt;em&gt;&lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v12.x.x/"&gt;download link&lt;/a&gt;)&amp;nbsp;&lt;/em&gt;and use the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Fpwm_example.html"&gt;PWM library example&lt;/a&gt;&amp;nbsp;as reference.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There you can easily initialize and enable UART in the &amp;quot;sdk_config.h&amp;quot; file.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;Here is a t&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/30338/getting-started-for-beginners" rel="noopener noreferrer" target="_blank"&gt;hread with some useful links&lt;/a&gt;&amp;nbsp;on how you could get started.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>