<?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>nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15659/nrf51822-seems-fail-to-run-the-code</link><description>Hi, Nordic and all great guys, 
 I have a weird and terrible problem about our products,which used a MCU based on nrf51822.
Some info about our product:this is a module powered by 12-24V DC power, BLE accepts commands from users and control a relay</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Aug 2016 02:52:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15659/nrf51822-seems-fail-to-run-the-code" /><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59803?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2016 02:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c791552c-b9c5-4c88-86d8-da803bbefa1e</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;HI， Øyvind Karlsen,&lt;/p&gt;
&lt;p&gt;Thanks for not losing this question. we want to know that ,even if some hard fault happenned(DEBUG defined) ,then code goes into endless loop, if I enable the watchdog(feed the dog in mainthread while loop ), soon or later the dog will reset the MCU, it is right? If yes, I think we should not worry about code, right? and another question :will  the short time voltage ripple over 100mV on VCC cause problem? I have attached the PCB layout above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59804?ContentTypeID=1</link><pubDate>Sat, 20 Aug 2016 15:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65e10880-70ad-4b21-94b4-e127961331d5</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry it seems like this case got lost in my inbox. If you have not defined DEBUG yet I would recommend you to follow the guidelines in &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;this post&lt;/a&gt; and verify that it is acutally not hanging somewhere.&lt;/p&gt;
&lt;p&gt;Full layout would be helpful as well, if you are uncomfortable posting this publically you can create a ticket in our closed support portal &lt;a href="https://www.nordicsemi.com/eng/Support-Community/Contact-Support-Team"&gt;mypage&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59802?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 00:58:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1b44ea7-a178-4049-9c58-e512c8e81a49</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;hi,Øyvind Karlsen ,&lt;/p&gt;
&lt;p&gt;Will you come back to this question? thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59801?ContentTypeID=1</link><pubDate>Sun, 14 Aug 2016 06:53:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:317e1197-4855-433b-863f-9ad4172f2fa3</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;Hi,Øyvind Karlsen ,
We want to know that what else can cause the code fail to run,even watchdog didn`t take effect, except NRESET is being interferenced. I think if my way of using watchdog above is right, then we could totally not consider the software issue ,and facus on hardware issue, is that right? or something I have missed on the software aspect.please help, Thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59796?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 11:13:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c83f8bfe-ac89-4418-bb4e-88e498660db4</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;Hi, Øyvind Karlsen ,&lt;/p&gt;
&lt;p&gt;I have used a watchdog in the main thread, the main thread is a while(1) loop containing certain times of _WFE() in the loop, after the _WFE(), we feed the dog. So, if the code is dead in a while(1) loop somewhere not in the main thread , no body feed the dog, and the dog will reset the system, and I think the dog is a kind of hardware thing ,once enabled, will not be effected by code. Do you think this is a right thing to do?  Yes ,we are using SDK(7.1.0), and I did not touch the DEBUG flag, I even don`t know how to change it. Thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59797?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 10:23:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:114bd066-7cf0-4163-8ba6-1f0411984772</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;The reason I am concerned about this is that a debug reset successfully resets the chip, which is a strong indication for a while(1) hanging scenario. Are you basing the code on the SDK and using the DEBUG flag by any chance?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59798?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 09:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec5322bb-7c53-4482-847a-2f919041e040</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;Hi,Øyvind Karlsen ,&lt;/p&gt;
&lt;p&gt;currently we have not found case that CPU hanging in a while(1) loop, even there is undetected while(1) loop in our code, we have watchdog, if we don`t feed the dog in the main thread while(1) loop, in the case that the code is running(not in the reset mode), I think the watchdog will save us too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59795?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 09:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a4e1b59-5d6c-49a8-9b9e-11435541b05e</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Could you verify that the code is not hanging in a while(1) loop somewhere due to an unhandeled error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59794?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 09:09:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a714d77f-4a3b-483f-89b3-d4417effe742</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;Hi, Øyvind Karlsen ,&lt;/p&gt;
&lt;p&gt;We have not found way to decrease the VCC voltage ripple on current products, I wanna know that if there is some kind of time limit for the voltage ripple,for example, if the ripple time is less than certain value, the voltage ripple will not effect the internal power regulators. By the way ,the frequency of the ripple is about 2Khz to 3Khz,and the ripple time is less than 200ms.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59793?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 07:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff974086-ef99-4a07-ac6a-0a0fe3c8ec8e</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The internal power regulators are not specced to handle this high ripple, generally you will get unspecified behaviour, the effect is also highly dependent on the frequency of the ripple. In particular you will have issues with the power supply modulating into the radio.&lt;/p&gt;
&lt;p&gt;Start by resolving the power issues, the reset issue could be related. While testing power you can hardwire reset to VDD.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59800?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 05:35:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:145967f0-6b29-41c6-a19c-1f765dc5a21a</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;Hi,Øyvind Karlsen ,
We have tested the waveform on the NRESET pin, when we touch the wire connected to NRESET pin, we found so many glitches, many of them will drop the voltage below 2V, so they might RESET 51822 persistently, the phenomenon causeed by it is similar to the &amp;quot;dead ones&amp;quot;, no BLE actions, no GPIO interrupt response,no watchdog timeouts. However, we still can not explain why they are powered again, they become normal.
If we add a capacity between NRESET PIN and GND,these glitches become too small,and the MCU works normal,even we touch the NRESET pin with or without metal wires, but it seems that we can not flash the MCU any more, is it right? We still want to know the what the ripple over 100mV on VCC will cause. Thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59799?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 03:06:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87def0d9-3062-4b09-9ebb-ac1133adeecf</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;Hi,Øyvind Karlsen ,&lt;/p&gt;
&lt;p&gt;we found more strange things about the NRESET pin, we just use a wire connecting NRESET PIN, AND without touching the wire, we just get close to the wire using hands ,51822 will also be reset, even if there are wires carrying electrical power closing to the wire connected to NRESET, 51822 will also be reset.We don`t know why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59792?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 01:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8053b56-f727-46ef-bad3-12a045cfdaf0</guid><dc:creator>hunterliuyi</dc:creator><description>&lt;p&gt;Thanks for reply,Øyvind Karlsen&lt;/p&gt;
&lt;p&gt;Q1:What happens if you perform a debug or firmware reset to these devices that have frozen?
A: We have try to touch the NRESET PIN with metal wire and found that,1,if we just touch it and left it quickly, 51822 will get a reset and the code will run again,2, if we keep touching the NRESET pin, code is not running,the current comsuption raise to 3-4mA, this two status will happen even if my hand don`t touch the metal part of the wire.&lt;/p&gt;
&lt;p&gt;Q2：What kind of ripple do you see on the VDD line?
A：we now just test the voltage rise of normal one,since we get a 47uF capacitance between the LDO and MCU ,the rising time from 0V to 2V is about 5ms, 0V to 3V is about 25ms, I not sure that time is too long for a power on reset, we also found that sometimes  we power on the module and it will not start to run the code. I don`t know how to attatch a picture in comment.  When the code is running ,we tested the buzzer and found that  there would be around 200mV ripple on the VDD pin of 51822, I wanna kown that what the ripple will cause?&lt;/p&gt;
&lt;p&gt;Q3:The nRF51 is only specified to source a maximum of 15 mA in high drive through gpios, are you exceeding this?
A:We have not seen that current comsuption.
Anything you want to know more ,please add a comment,Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 seems fail to run the code</title><link>https://devzone.nordicsemi.com/thread/59791?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2016 08:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb609dfb-3c72-4d8c-afcb-d0cd601f6ecb</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Couple of questions. What happens if you perform a debug or firmware reset to these devices that have frozen?&lt;/p&gt;
&lt;p&gt;What kind of ripple do you see on the VDD line?&lt;/p&gt;
&lt;p&gt;How is VCC routed? We recommend that each device in the system is connected individually through a star node (so that high current draws on one device will not drop voltages for all devices), preferably this star node should have a capacitor reservoir.&lt;/p&gt;
&lt;p&gt;I would also try probing the reset line to see that the pull is strong enough.&lt;/p&gt;
&lt;p&gt;The nRF51 is only specified to source a maximum of 15 mA in high drive through gpios, are you exceeding this?&lt;/p&gt;
&lt;p&gt;I am also not sure that the LDO you are using is properly specced, it seems that it will in certain cases deliver more than 100 mV ripple (we require that the ripple be less than this, with increased sensitivity as the voltage drops). Set up a constant load of approx 16 mA and test the ripple.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>