<?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>nrf52832 cannot control a PWM(servo motor) via Bluetooth</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35048/nrf52832-cannot-control-a-pwm-servo-motor-via-bluetooth</link><description>I am using the Hackable kit which has nrf52832 to control a servo motor and read accelerometer(AXL335) readings through a iOS app. I am a novice when comes to embedded. I got the ios app ready to send an integer value to the kit. Right now i am using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Jun 2018 07:29:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35048/nrf52832-cannot-control-a-pwm-servo-motor-via-bluetooth" /><item><title>RE: nrf52832 cannot control a PWM(servo motor) via Bluetooth</title><link>https://devzone.nordicsemi.com/thread/134837?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 07:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91c1f072-810f-4274-8c7d-f51084804b23</guid><dc:creator>Kautham</dc:creator><description>&lt;p&gt;Thanks for your tip buddy. I will try out the UART logging as you suggest. If it isn&amp;#39;t working then i have to do it with the leds. I will try it out and let you know. Again thanks a lot. It is a drag to not own a J-Link or any of nordics DK&amp;#39;s.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 cannot control a PWM(servo motor) via Bluetooth</title><link>https://devzone.nordicsemi.com/thread/134831?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 07:08:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06ee4da8-822e-47b2-84d3-bcbf66c7dd75</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. I understand. Then I suggest that you try to get some logging information via UART, since RTT is not available, and debugging is not an option.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Actually, this makes it a bit hard to develop software on your device. Do you have access to any of the nRF DKs? Either nRF51DK or nRF52DK? If not, then you have to get the logging information from the UART, but you would need an external UART-&amp;gt;USB device.&amp;nbsp;Try to google &amp;quot;uart to usb&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t have any of these, I guess you can try to toggle a led after every before APP_ERROR_CHECK(err_code) if err_code != 0 (NRF_SUCCESS)&lt;/p&gt;
&lt;p&gt;But you would also have to stop your device after these, because an APP_ERROR_CHECK(err_code) with an err_code != 0 will reset the device. So maybe you can go into some infinite loop, instead of APP_ERROR_CHECK().&lt;/p&gt;
&lt;p&gt;You will have to do this once for every APP_ERROR_CHECK() you want to check. Change the code, compile, upload and see.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am sorry. It is a bit hard to do app development if you can&amp;#39;t see what is actually going on in the software.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 cannot control a PWM(servo motor) via Bluetooth</title><link>https://devzone.nordicsemi.com/thread/134763?ContentTypeID=1</link><pubDate>Tue, 05 Jun 2018 13:50:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ef15d22-651c-476b-8746-397f01a8c4a2</guid><dc:creator>Kautham</dc:creator><description>&lt;p&gt;Sorry for the delayed information I don&amp;#39;t own a J-Link device. I use &lt;a href="https://github.com/electronut/ElectronutLabs-Bumpy"&gt;Bumpy&amp;nbsp;&lt;/a&gt;&amp;nbsp;to load my code. Also for all the ble examples i have to merge the s132_softdevice.hex and the app.hex files using the nRF5x-command-line-tools mergehex command and then load this merged hex file. The problem is this merged hex file does not contain any debug symbols so i cannot debug it at the runtime and also no log comes to the GDB console. Hence i am stuck in this debugging. So could you please point me if i am missing anything or any alternative.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 cannot control a PWM(servo motor) via Bluetooth</title><link>https://devzone.nordicsemi.com/thread/134742?ContentTypeID=1</link><pubDate>Tue, 05 Jun 2018 12:46:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29609ef0-c11a-45c3-89de-9a6adbac6031</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. So it sounds like the application is stopping somewhere. Try out the debugging tip ,or RTT log, because if you are able to program the chip, then it uses the same wires for the&amp;nbsp;RTT log. Just define RTT_LOG_BACKEND_ENABLE 1 and NRF_LOG_ENABLE 1 in SDK config, open JLINK RTT Viewer and run the application.&lt;/p&gt;
&lt;p&gt;The log module in SDK15 should print all relevant debug info.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 cannot control a PWM(servo motor) via Bluetooth</title><link>https://devzone.nordicsemi.com/thread/134720?ContentTypeID=1</link><pubDate>Tue, 05 Jun 2018 11:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a363c764-c32c-4387-b74a-d197fa3dbb2c</guid><dc:creator>Kautham</dc:creator><description>&lt;p&gt;Thanks for your time. Sorry if my texts&amp;nbsp;&lt;span&gt;&amp;quot;the program crashes at run time&amp;quot; were misleading. What i meant&amp;nbsp;is, the ble_blinky has a flow that if it is not connected or disconnected from the device(iOS app) the red LED would light up and the BLE would advertise again. But after Running PWM, even if i disconnect from my iOS app the BLE won&amp;#39;t advertise and no red LED. Also after the sending the command (case 4 and 5) for the PWM,&amp;nbsp; the commands for the external LEDs(case 0 and 1) and buzzer(case 2 and 3) doesn&amp;#39;t toggles&amp;nbsp;them.I have to reset the kit with the reset button on the kit to start the program from the beginning.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But thanks for the debugging tip. I will try them and reply to you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 cannot control a PWM(servo motor) via Bluetooth</title><link>https://devzone.nordicsemi.com/thread/134698?ContentTypeID=1</link><pubDate>Tue, 05 Jun 2018 09:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:915f2fb7-5424-4a32-b5bf-85eb8442484e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;When you say that &amp;quot;the program crashes at run time&amp;quot;, can you please explain what happens?&lt;/p&gt;
&lt;p&gt;I assume that it is one of the calls for APP_ERROR_CHECK(err_code) that receives an err_code != 0 (NRF_SUCCESS). Have you checked your log? I am not familiar with the hackable kit, but you can either enable the UART logging backend, or the RTT logging backend. I assume that you program the kit via SWDIO pin. This means that you can use the RTT backend, which will send the logging information via this pin. You can view the log in JLINK RTT Viewer.&lt;/p&gt;
&lt;p&gt;You can also enable the UART log backend, and use one of the pins as the UART TX pin. All of these settings are set in sdk_config.h.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternatively, you can debug to find out which call that returned the err_code != 0. add the define DEBUG in your preprocessor defines (and you probably need to turn off optimization as well. Set it to -O0). Then set a breakpoint on line 91 in app_error_weak.c. this is where the error is sent to the log, so you can see here what id, the file name and line code where the error occured.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>