<?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>Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40160/custom-nrf52832-board-only-boots-right-after-flashing</link><description>I have a custom designed PCB that has the nRF52832 (taiyo yuden EYSHCNZWZ) on board. 
 When I flash the board using pogo pins and the jlink (debug out) from a nRF52DK, everything works as expected. However, if I power off the board, and the power it back</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Nov 2018 14:06:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40160/custom-nrf52832-board-only-boots-right-after-flashing" /><item><title>RE: Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/thread/156337?ContentTypeID=1</link><pubDate>Wed, 07 Nov 2018 14:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cc26198-6524-43b8-9f9c-cb33e99ee1e7</guid><dc:creator>Edvin</dc:creator><description>[quote user="jen.rossey@ugent.be"]I also have some issues with SPI not getting the correct data at 8MHz, but it is working at 1MHz. When I connect the JLink debugger, 8MHz is working. Probably the same clock configuration issue?[/quote]
&lt;p&gt;&amp;nbsp;To be honest, that doesn&amp;#39;t sound very likely. If you are the SPI master, you are the one generating the clock signal. It shouldn&amp;#39;t matter whether it is a bit off. If you are the slave, you get the clk signal from the master, so that should be fine too. Either way, 1MHz is too fast for the 32kHz. It is not that clock that deals with SPI.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It may be that you have too long SPI wires. Things start to act weird when you are around 4MHz. Unless it is a short PCB trace, 8MHz sounds a bit too fast.&lt;/p&gt;
&lt;p&gt;&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: Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/thread/156179?ContentTypeID=1</link><pubDate>Tue, 06 Nov 2018 13:46:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0770be83-3da4-4107-a716-2b5ade5984aa</guid><dc:creator>JenR</dc:creator><description>&lt;p&gt;I will contact Taiyo Yuden for the LFXTAL specs.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Power is the same when programming or not.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also have some issues with SPI not getting the correct data at 8MHz, but it is working at 1MHz. When I connect the JLink debugger, 8MHz is working. Probably the same clock configuration issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/thread/156147?ContentTypeID=1</link><pubDate>Tue, 06 Nov 2018 12:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bff5f550-a914-408a-a8b1-eec720b906b5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry. You are correct. I found the datasheet to the&amp;nbsp;&lt;span&gt;EYSHSNZWZ, not&amp;nbsp;EYSHCNZWZ&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t find any information on the LFXTAL in that datasheet either. You can check with the vendor or producer of the module. They should know.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I found a hint, though. On page 9 in the datasheet that you sent, there is a section regarding ANT:&lt;/p&gt;
&lt;p&gt;&amp;quot; *2 ANT specification requires +/-50ppm accuracy for 32.768kHz clock. the internal 32.768kHz crystal does not meet to +/-50ppm over the whole recommended operation temperature range. &amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So it&amp;nbsp;&lt;strong&gt;probably&lt;/strong&gt; means that the XTAL is in the field around 50ppm, but not below that value for all temperatures. It is probably not 20ppm, which is the default setting in the SDK examples. Try to just increase (/decrease) the accuracy from 20ppm to 50ppm or 75ppm in sdk_config.h.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Just to be sure, you power up the chip the same way when you program it and when you don&amp;#39;t?&lt;/p&gt;
&lt;p&gt;&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: Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/thread/156138?ContentTypeID=1</link><pubDate>Tue, 06 Nov 2018 11:43:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f977842d-4efe-4ac6-bc9c-e97132d912c0</guid><dc:creator>JenR</dc:creator><description>&lt;p&gt;&lt;a href="https://www.yuden.co.jp/wireless_module/document/datareport2/en/TY_BLE_EYSHCNZWZ_DataReport_V1_1_20170925E.pdf"&gt;This&lt;/a&gt;&amp;nbsp;is the correct datasheet for the&amp;nbsp;&lt;span&gt;EYSHCNZWZ. The block diagram (below) shows a LFXTAL of 32.768KHz.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1541504295539v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can&amp;#39;t seem to find any detail on this&amp;nbsp;XTALs and&amp;nbsp;the accuracy. Can I assume it is just as good as the one on the DK and use those same settings?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/thread/156082?ContentTypeID=1</link><pubDate>Tue, 06 Nov 2018 08:57:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0938cb6-17fb-4a47-9a59-1f7b1bfa76ff</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I see &lt;a href="https://www.yuden.co.jp/wireless_module/document/datareport2/en/TY_BLE_EYSHSNZWZ_DataReport_V1_3_20180530E.pdf"&gt;here&lt;/a&gt; that the&amp;nbsp;&lt;span&gt;EYSHCNZWZ does not have a LFXTAL, so I assume you have added that to your PCB? What sort of LFXTAL do you have? Can you double check the accuracy of the XTAL? is it 20PPM? If not, modify your NRF_SDH_CLOCK_LF_ACCURACY to match your LFXTAL. Please also check that your capacitors connected to the LFXTAL are matching (page 14&amp;nbsp;in the link above).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The capacitor values are described in figure 4 here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fclock.html&amp;amp;cp=2_1_0_18_1&amp;amp;anchor=concept_xkj_np1_2r"&gt;http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fclock.html&amp;amp;cp=2_1_0_18_1&amp;amp;anchor=concept_xkj_np1_2r&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So what is the internal capacitance on your LFXTAL, and what is the capacitance on your C1 and C2?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/thread/156062?ContentTypeID=1</link><pubDate>Tue, 06 Nov 2018 07:43:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37da3940-6089-48a7-8a76-7c5954f11deb</guid><dc:creator>JenR</dc:creator><description>&lt;p&gt;Thanks for the reply!&amp;nbsp;The&amp;nbsp;&lt;span&gt;taiyo yuden I use has a 32kHz external crystal so I was using these settings:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define NRF_SDH_CLOCK_LF_SRC 1&lt;br /&gt;#define NRF_SDH_CLOCK_LF_RC_CTIV 0&lt;br /&gt;#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0&lt;br /&gt;#define NRF_SDH_CLOCK_LF_ACCURACY 7&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I switched to the settings you suggested and the board is booting, so that seems good. If I understand correctly, using your settings, the internal oscillator is used and this should also improve power consumption, which is a good thing for my use case.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I add the&amp;nbsp;nrf_pwr_mgmt_run() before the ble_stack_init(), the board still hangs on the&amp;nbsp;nrf_pwr_mgmt_run() function (when not connected to debugger). This is not really an issue for me as I don&amp;#39;t really need that function there.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/thread/156007?ContentTypeID=1</link><pubDate>Mon, 05 Nov 2018 15:21:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:914af60a-dc9a-4d96-a5a2-6b047ee7bf36</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I suspect this may be related to your clock settings. The DK has an external LFXTAL, which is the low frequency clock source. Do you use BLE in the application that you use?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you try to set the following defines in sdk_config.h? (The names are from the latest SDK, SDK15.2.0, since I don&amp;#39;t know what SDK version you are using.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;#define NRF_SDH_CLOCK_LF_SRC 0&lt;/p&gt;
&lt;p&gt;#define NRF_SDH_CLOCK_LF_RC_CTIV 16&lt;/p&gt;
&lt;p&gt;#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2&lt;/p&gt;
&lt;p&gt;#define NRF_SDH_CLOCK_LF_ACCURACY 1&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;See if your application starts with these settings.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When you program the device, and have the debugger connected, the chip will get the clock source from the debugger, but when you run your custom application, it doesn&amp;#39;t actually have a clock source, since it expects to have an external LFXTAL, unless something else is specified in sdk_config.h.&lt;/p&gt;
&lt;p&gt;&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: Custom nrf52832 board only boots right after flashing</title><link>https://devzone.nordicsemi.com/thread/155889?ContentTypeID=1</link><pubDate>Mon, 05 Nov 2018 09:26:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf556ef8-09c0-4919-a026-8c41893d6e73</guid><dc:creator>JenR</dc:creator><description>&lt;p&gt;I figured out the problem myself. Apparently the board does not boot when the jlink is connected either. So I could use printf&amp;#39;s to debug. This is just annoying with the pogo pins as I have to hold them in place by hand.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the problem was that I ran the&amp;nbsp;&lt;span&gt;nrf_pwr_mgmt_run() function before the ble_stack_init() in the main function. For some reason this does not hang when flashing the device and running immediately, but it does hang when booting after a power toggle. No idea why...&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>