<?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 WLCSP Package SWD Programming with nRF52DK (PCA10040)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65615/nrf52832-wlcsp-package-swd-programming-with-nrf52dk-pca10040</link><description>Dear Nordic FAE and fellow engineers, 
 I am using a custom board with nRF52832 WLCSP and I am trying to program it via SWD using NRF52DK PAC10040, and SES for programming SDK_17.0. I followed 2 layer reference design of NRF52832 CIAA, however the program</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Nov 2020 15:03:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65615/nrf52832-wlcsp-package-swd-programming-with-nrf52dk-pca10040" /><item><title>RE: nRF52832 WLCSP Package SWD Programming with nRF52DK (PCA10040)</title><link>https://devzone.nordicsemi.com/thread/279063?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 15:03:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeb02b64-be8f-403d-8e20-24fb87862473</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The content of the registers is dependent on when you check them in the execution of the program and what compiler that is used to build the application. It doesn&amp;#39;t really tell us what the error is.&lt;/p&gt;
&lt;p&gt;Build an unmodified example from the SDK in debug mode and flash it to your custom board. &lt;strong&gt;The only thing that you should modify is the custom board map that maps the pins correctly&lt;/strong&gt;. A error message should then be outputted when the application hits an error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note, that your original problems statement was that it wasn&amp;#39;t flashed properly to the board. But it seems that the application is indeed flashed properly, but that it&amp;#39;s running into some run-time error. Exactly what error is what we&amp;#39;re trying to figure out.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 WLCSP Package SWD Programming with nRF52DK (PCA10040)</title><link>https://devzone.nordicsemi.com/thread/278888?ContentTypeID=1</link><pubDate>Sun, 08 Nov 2020 08:42:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6370ee7-c3c0-4530-8a9e-ffc0a03bb2ad</guid><dc:creator>radleyp</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After further inspection, I find that there are some discrepancies in the register. My findings are as follow :&lt;/p&gt;
&lt;p&gt;1. Below is the register read after flashing the program via SES where the BLE application is running properly.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2020_2D00_11_2D00_08-at-4.14.00-PM.png" /&gt;&lt;/p&gt;
&lt;p&gt;2. Below is the register read after power restart where the BLE cannot be detected on the mobile phone.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2020_2D00_11_2D00_08-at-4.15.49-PM.png" /&gt;&lt;/p&gt;
&lt;p&gt;3. However, the program runs again after I did verify in SES (target --&amp;gt; verify) or when I connect it on nRF Connect Programmer.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2020_2D00_11_2D00_08-at-3.52.55-PM.png" /&gt;&lt;/p&gt;
&lt;p&gt;4. When programming the device with hex file via&amp;nbsp;&lt;span class="s1"&gt;nrfjprog --program ble_app_uart_pca10040_s132.hex --sectoranduicrerase&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;, the read register is also different. It becomes as follow :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2020_2D00_11_2D00_08-at-4.40.59-PM.png" /&gt;&lt;/p&gt;
&lt;p&gt;It looks like there are errors in my setup, please advise what I did wrong, thank you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Reno&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 WLCSP Package SWD Programming with nRF52DK (PCA10040)</title><link>https://devzone.nordicsemi.com/thread/278546?ContentTypeID=1</link><pubDate>Thu, 05 Nov 2020 08:33:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a5d96e0-f044-4f20-9e86-4f15131a1b26</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please specify what you mean by &amp;quot;does not work&amp;quot;, where does the program stop? It could be the button, but it depends entirely on what error that you get.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 WLCSP Package SWD Programming with nRF52DK (PCA10040)</title><link>https://devzone.nordicsemi.com/thread/278522?ContentTypeID=1</link><pubDate>Thu, 05 Nov 2020 01:08:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f151a10f-a4e2-4088-9bc0-87ec4502b5fc</guid><dc:creator>radleyp</dc:creator><description>&lt;p&gt;Hi Jared,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;It turns out that the custom_board.h file was the issue. It was still defined as pca10040.h. However, currently the program does not work after power restart.&amp;nbsp;Could it be the button defined in the custom_board.h that causes the issue ? Since my board does not have any button. Below is the attached header file for the custom board. Please advise, thank you.&lt;pre class="ui-code" data-mode="text"&gt;/**
 * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 *
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 *
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
#ifndef CUSTOM_BOARD_H
#define CUSTOM_BOARD_H

#ifdef __cplusplus
extern &amp;quot;C&amp;quot; {
#endif

#include &amp;quot;nrf_gpio.h&amp;quot;

// LEDs definitions for 
#define LEDS_NUMBER    1

#define LED_1          8

#define LEDS_ACTIVE_STATE 1

#define LEDS_INV_MASK  LEDS_MASK

#define LEDS_LIST { LED_1 }

#define BSP_LED_0      LED_1

#define BSP_LED_0_MASK (1&amp;lt;&amp;lt;BSP_LED_0)

#define LEDS_MASK      (BSP_LED_0_MASK)

#define LEDS_INV_MASK  LEDS_MASK

#define BUTTONS_NUMBER 1

#define BUTTON_START   13
#define BUTTON_1       13
#define BUTTON_STOP    13
#define BUTTON_PULL    NRF_GPIO_PIN_PULLDOWN

#define BUTTONS_ACTIVE_STATE 0

#define BUTTONS_LIST { BUTTON_1 }

#define BSP_BUTTON_0   BUTTON_1

#define RX_PIN_NUMBER  26
#define TX_PIN_NUMBER  27
#define CTS_PIN_NUMBER 24
#define RTS_PIN_NUMBER 25
#define HWFC           false

#define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,              \
                                 .rc_ctiv       = 16,                               \
                                 .rc_temp_ctiv  = 2,                                \
                                 .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}

#ifdef __cplusplus
}
#endif

#endif

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 WLCSP Package SWD Programming with nRF52DK (PCA10040)</title><link>https://devzone.nordicsemi.com/thread/268646?ContentTypeID=1</link><pubDate>Wed, 09 Sep 2020 07:23:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83dd5e23-2f20-46d6-ac8f-00f8faff09df</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Ok, so the program is actually flashed properly since you&amp;#39;re able to use the debugger in SES. I flashed a nRF52 DK with the example and it worked without any issues. Have you made a custom board file for your custom board? Note that resuming a softdevice application in debugging after you&amp;#39;ve halted it will result in error. You would have to restart the application between every time you&amp;#39;ve paused it during debugging. Exactly at what step in timers_init() does it hardfault?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 WLCSP Package SWD Programming with nRF52DK (PCA10040)</title><link>https://devzone.nordicsemi.com/thread/268584?ContentTypeID=1</link><pubDate>Tue, 08 Sep 2020 15:36:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ad7756c-64a7-4228-82e9-3b349f82178a</guid><dc:creator>radleyp</dc:creator><description>&lt;p&gt;Thank you for your respond. Yes, below is the log message. I am using this program from Nordic GitHub (&lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples"&gt;link&lt;/a&gt;)&amp;nbsp;to test BLE and ADC of my custom board.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2020_2D00_09_2D00_08-at-11.07.22-PM.png" /&gt;&lt;/p&gt;
&lt;p&gt;I tried to debug with SES, and it stopped at timers.init() and stopped at HardFault_Handler(). Do I need to change one of the timer parameters in the sdk_config ? Please advise what possibly caused this issue. Please refer to image below for details on the debugging, thank you.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/960x480/__key/communityserver-discussions-components-files/4/Screenshot-2020_2D00_09_2D00_08-at-11.22.13-PM.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 WLCSP Package SWD Programming with nRF52DK (PCA10040)</title><link>https://devzone.nordicsemi.com/thread/268327?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2020 13:10:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c3ce264-2f7b-4b24-acd1-b85f630607ef</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How do you determine that the application isn&amp;#39;t properly flashed? Could you try using nrfjprog and program it directly with the log option:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrfjprog --program YOURHEXFILE --sectorerase --log&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>