<?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>Problem Run and Test DTM at customer hardware with nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84672/problem-run-and-test-dtm-at-customer-hardware-with-nrf52840</link><description>Hello, 
 I face at least 2 problems and need some support. 
 What I want to achieve is that the DTM runs at our customer hardware for radio and later on BLE certification. 3 years ago we made this with nRF52832 and it was absolutely no problem, that&amp;#39;s</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Feb 2022 09:31:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84672/problem-run-and-test-dtm-at-customer-hardware-with-nrf52840" /><item><title>RE: Problem Run and Test DTM at customer hardware with nRF52840</title><link>https://devzone.nordicsemi.com/thread/353298?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 09:31:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55648200-47b4-4303-90d6-f385c6f2ac4f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi MatthK,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am quite certain that the firmware itself is alright, unless you have changed core behavior of the DTM source code, or any of your clock sources are problematic (ie. not present or incorrectly loaded)&lt;/p&gt;
&lt;p&gt;The usual&amp;nbsp;problem when DTM is misbehaving&amp;nbsp;is physical connection issues. This can be incorrect pin connected to the external USB/UART converter for instance, or that the pin itself is physically connected to another device on the custom PCB.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="matthk"]When I try to connect my custom hardware containing nRF52840 and the USB/UART bridge (FT230X) to the nRF Connect Software at the PC I click at &amp;#39;Select Device&amp;#39;; then I get &amp;#39;Unknown 0000... FFFF&amp;#39;. When selecting this device the error &amp;#39;Can not communicate with device. Make sure it is not in&amp;nbsp;use by&amp;nbsp;another application and that it has a Direct Test Mode compatible firmware.&amp;#39; appears.[/quote]
&lt;p&gt;You are certain that there&amp;#39;s no external terminal (putty, teraterm, etc) that is claiming the COM port?&lt;/p&gt;
[quote user="matthk"]Then&amp;nbsp;I have&amp;nbsp;measured at TXD at the FT230X, but I can see only 3.3V (probably idle mode) appear. Could this voltage creates problems as the nRF52840 is supplied with 3.0V? 3 years ago with nRF52832 and the same conditions every worked well.[/quote]
&lt;p&gt;This is not a problem.&lt;/p&gt;
[quote user="matthk"]I have started a sweep at the nRF Connect for Windows with connected PCA10056 board; I can see the running channel at 0dBM at the (Transmitter) screen as expected. So I suppose that at the tester side everything runs as expected. Unfortunately nothing to see at the Receiver screen...[/quote]
&lt;p&gt;When transmitting, you should keep the device static at one channel. This is because there&amp;#39;s no synchronization between tester and DUT when it comes to what channel they&amp;#39;re communicating on.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That being said, if you can successfully start and stop a test, then the DTM is running properly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried programming your custom.hex file to the nRF52840-DK, then connect your FTDI to the specific pins to see if&amp;nbsp;works on a DK?&lt;/p&gt;
&lt;p&gt;I changed the uart_init function to reflect your pin out:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void uart_init(void)
{   
    uint32_t err_code;
    const app_uart_comm_params_t comm_params =
      {
          30, /*RX_PIN_NUMBER,*/
          12, /*TX_PIN_NUMBER,*/
          RTS_PIN_NUMBER,
          CTS_PIN_NUMBER,
          APP_UART_FLOW_CONTROL_DISABLED,
          false,
          DTM_BITRATE
      };

    APP_UART_FIFO_INIT(&amp;amp;comm_params,
                       UART_RX_BUF_SIZE,
                       UART_TX_BUF_SIZE,
                       uart_error_handle,
                       APP_IRQ_PRIORITY_LOWEST,
                       err_code);

    APP_ERROR_CHECK(err_code);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And tested this on my nRF52840-DK, and it entered DTM modes without any issues.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem Run and Test DTM at customer hardware with nRF52840</title><link>https://devzone.nordicsemi.com/thread/353139?ContentTypeID=1</link><pubDate>Tue, 15 Feb 2022 14:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a20c0f3-a2dc-43e7-9e65-7567562dc41a</guid><dc:creator>matthk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have started a sweep at the nRF Connect for Windows with connected PCA10056 board; I can see the running channel at 0dBM at the (Transmitter) screen as expected. So I suppose that at the tester side everything runs as expected. Unfortunately nothing to see at the Receiver screen...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then&amp;nbsp;I have&amp;nbsp;measured at TXD at the FT230X, but I can see only 3.3V (probably idle mode) appear. Could this voltage creates problems as the nRF52840 is supplied with 3.0V? 3 years ago with nRF52832 and the same conditions every worked well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I try to connect my custom hardware containing nRF52840 and the USB/UART bridge (FT230X) to the nRF Connect Software at the PC I click at &amp;#39;Select Device&amp;#39;; then I get &amp;#39;Unknown 0000... FFFF&amp;#39;. When selecting this device the error &amp;#39;Can not communicate with device. Make sure it is not in&amp;nbsp;use by&amp;nbsp;another application and that it has a Direct Test Mode compatible firmware.&amp;#39; appears.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have still the impression that the Hardware configuration in the target electronics is not ok, but in which file (after calling uart_init()) can I check that?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When stepping through uart_init() I see that the structure comm_params contains the right Pins for RxD and Txd, RTS and CTS are not used; the Flow Control is disabled and the&lt;/span&gt;&amp;nbsp;baudrate parameter contains&amp;nbsp;536871040 which corresponds to 19200 Baud as far as I know. Up to the end of uart_init() (breakpoint) also the supply current is quite low, so the problem seems to come later...&lt;/p&gt;
&lt;p&gt;The custom_board.h contains (TX testwise moved from P0.17 to P 0.30):&lt;/p&gt;
&lt;p&gt;#ifndef BOARD_CUSTOM_H&lt;br /&gt;#define BOARD_CUSTOM_H&lt;/p&gt;
&lt;p&gt;#ifdef __cplusplus&lt;br /&gt;extern &amp;quot;C&amp;quot; {&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;#include &amp;quot;C:\SVN\sources\SDK_17_1\modules\nrfx\hal\nrf_gpio.h&amp;quot;&lt;/p&gt;
&lt;p&gt;// LEDs definitions for HW Version &amp;#39;h&amp;#39;&lt;br /&gt;#define LEDS_NUMBER 0&lt;br /&gt;#define BUTTONS_NUMBER 0&lt;/p&gt;
&lt;p&gt;#define RX_PIN_NUMBER 12&lt;br /&gt;#define TX_PIN_NUMBER 30 // testwise, normally 17&lt;br /&gt;#define CTS_PIN_NUMBER UART_PIN_DISCONNECTED // 8&lt;br /&gt;#define RTS_PIN_NUMBER UART_PIN_DISCONNECTED // 30&lt;br /&gt;#define HWFC false&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;}&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;#endif // BOARD_CUSTOM_H&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the makefile I have the following settings:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;# Libraries common to all targets&lt;br /&gt;LIB_FILES += \&lt;/p&gt;
&lt;p&gt;# Optimization flags&lt;br /&gt;OPT = -O3 -g3&lt;br /&gt;# Uncomment the line below to enable link time optimization&lt;br /&gt;#OPT += -flto&lt;/p&gt;
&lt;p&gt;# C flags common to all targets&lt;br /&gt;CFLAGS += $(OPT)&lt;br /&gt;CFLAGS += -DBOARD_CUSTOM&lt;br /&gt;CFLAGS += -DBSP_DEFINES_ONLY&lt;br /&gt;CFLAGS += -DCONFIG_GPIO_AS_PINRESET&lt;br /&gt;CFLAGS += -DFLOAT_ABI_HARD&lt;br /&gt;CFLAGS += -DNRF52840_XXAA&lt;br /&gt;CFLAGS += -mcpu=cortex-m4&lt;br /&gt;CFLAGS += -mthumb -mabi=aapcs&lt;br /&gt;CFLAGS += -Wall -Werror&lt;br /&gt;CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16&lt;br /&gt;# keep every function in a separate section, this allows linker to discard unused ones&lt;br /&gt;CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing&lt;br /&gt;CFLAGS += -fno-builtin -fshort-enums&lt;/p&gt;
&lt;p&gt;# C++ flags common to all targets&lt;br /&gt;CXXFLAGS += $(OPT)&lt;br /&gt;# Assembler flags common to all targets&lt;br /&gt;ASMFLAGS += -g3&lt;br /&gt;ASMFLAGS += -mcpu=cortex-m4&lt;br /&gt;ASMFLAGS += -mthumb -mabi=aapcs&lt;br /&gt;ASMFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16&lt;br /&gt;ASMFLAGS += -DBOARD_CUSTOM&lt;br /&gt;ASMFLAGS += -DBSP_DEFINES_ONLY&lt;br /&gt;ASMFLAGS += -DCONFIG_GPIO_AS_PINRESET&lt;br /&gt;ASMFLAGS += -DFLOAT_ABI_HARD&lt;br /&gt;ASMFLAGS += -DNRF52840_XXAA&lt;/p&gt;
&lt;p&gt;# Linker flags&lt;br /&gt;LDFLAGS += $(OPT)&lt;br /&gt;LDFLAGS += -mthumb -mabi=aapcs -L$(SDK_ROOT)/modules/nrfx/mdk -T$(LINKER_SCRIPT)&lt;br /&gt;LDFLAGS += -mcpu=cortex-m4&lt;br /&gt;LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16&lt;br /&gt;# let linker dump unused sections&lt;br /&gt;LDFLAGS += -Wl,--gc-sections&lt;br /&gt;# use newlib in nano version&lt;br /&gt;LDFLAGS += --specs=nano.specs&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What can I check next?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;MatthK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem Run and Test DTM at customer hardware with nRF52840</title><link>https://devzone.nordicsemi.com/thread/352935?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 14:48:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42b27af4-4663-48f7-b9ef-242947c7cd8d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi MatthK,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for explaining the setup.&lt;/p&gt;
&lt;p&gt;When you flash DTM on your custom device, with P0.12/P0.17 as the RXD/TXD, the TXD should be active low (ie. high when idle), while the RXD pin will float unless connected to a TXD on the FTDI-side. You can scope the pins to see if there&amp;#39;s any activity at all on the pins.&lt;/p&gt;
&lt;p&gt;You can also try different GPIOs if you want, as the default board pca10056 uses p0.12 as a button, unless you have redefined this in your boards file (note: BOARDS define must also be redefined in the Makefile).&lt;/p&gt;
&lt;p&gt;Easiest for quick testing different GPIOs is to just change the main.c::uart_init() function and hardcode the comm_params struct&amp;nbsp;directly, and recompile.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you able to setup any test in the PC application using the FTDI+custom board setup? If no, what is the error that you see on the PC side?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem Run and Test DTM at customer hardware with nRF52840</title><link>https://devzone.nordicsemi.com/thread/352899?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 13:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df668b25-336e-4145-ab60-99b1370e2726</guid><dc:creator>matthk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the DUT (Device under Test) is our target electronics containing a nrf52840 where I have the problem to make run the DTM application - a standard application with BLE (Using S140) use works perfect. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The tester side is the PCA10056 with the flashed hex-file&amp;nbsp;direct_test_mode_pca10056.hex from SDK17.1\examples\dtm\direct_test_mode\hex; as supposed I use this with nRF Connect for Desktop - DTM application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;MatthK&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem Run and Test DTM at customer hardware with nRF52840</title><link>https://devzone.nordicsemi.com/thread/352823?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 09:31:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a004097e-35e0-414f-8f41-8e5969eb4b3c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi MatthK,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="matthk"]&lt;p&gt;the TXD/RXD pins are connected to an UART/USB bridge FT230XS; this electroncs we have already used for the first certification 3 years ago with nRF52832; so I assume that this should do also with nRF52840.&lt;/p&gt;
&lt;p&gt;Concerning the point of fail of the DTM process: I would like to investigate more on that problem: Is there any point in the SW where the hardware should be completely initialized? Then I could set a breakpoint and see if the supply current is still ok or increased...&lt;/p&gt;[/quote]
&lt;p&gt;What is the tester-side setup at your end?&lt;/p&gt;
&lt;p&gt;Are you using a dedicated tester, or is there a nRF-kit acting as the tester (using nRF connect for desktop-&amp;gt;DTM application) ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem Run and Test DTM at customer hardware with nRF52840</title><link>https://devzone.nordicsemi.com/thread/352815?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 08:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7ac4c48-2a52-40e9-9853-099d9120d80e</guid><dc:creator>matthk</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;H&amp;aring;kon&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;the TXD/RXD pins are connected to an UART/USB bridge FT230XS; this electroncs we have already used for the first certification 3 years ago with nRF52832; so I assume that this should do also with nRF52840.&lt;/p&gt;
&lt;p&gt;Concerning the point of fail of the DTM process: I would like to investigate more on that problem: Is there any point in the SW where the hardware should be completely initialized? Then I could set a breakpoint and see if the supply current is still ok or increased...&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;MatthK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem Run and Test DTM at customer hardware with nRF52840</title><link>https://devzone.nordicsemi.com/thread/352635?ContentTypeID=1</link><pubDate>Fri, 11 Feb 2022 13:29:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1ca2fc4-ca76-46aa-8d2f-98bd5443d9b9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Matt,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]As 3 years ago I first tried to use the nRF Connect at my PC with the stick, the old nRF51 stick was compatible and worked well with nRF Connect. In the forum I read that with the nRF52840 Dongle this will not work, so I use the PC10056. I have erased this board and flashed the file direct_test_mode_pca10056.hex from SDK17.1\examples\dtm\direct_test_mode\hex. When powering this board I see a LED flickering; when selecting this board at nRF Connect (in Windows) the flickering changes a little bit; when I click at Start test the LED&amp;#39;s behaivour changes a little bit. It seems that this works, but can I make a test with the nRF52840 Dongle for verifying?[/quote]
&lt;p&gt;The nrf52840dongle, pca10059, does not have a example project specifically for DTM. This must then be manually created, as described in this thread:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt;Now coming to the main problem: I use a customer elecronics where our standard Software with BLE traffic (using SDK13; soon we will change to Zephyr) runs perfect. So I can assume that the HW is ok. Parallel to our standard project I have created a DTM project; here I use SDK17.1 to be sure that we meet the latest requirements for the radio certification. I have created a custom_board.h file which just contains:&lt;/p&gt;
&lt;p&gt;#define LEDS_NUMBER 0&lt;br /&gt;#define BUTTONS_NUMBER 0&lt;/p&gt;
&lt;p&gt;#define RX_PIN_NUMBER 12&lt;br /&gt;#define TX_PIN_NUMBER 17&lt;br /&gt;#define CTS_PIN_NUMBER UART_PIN_DISCONNECTED // 8&lt;br /&gt;#define RTS_PIN_NUMBER UART_PIN_DISCONNECTED // 30&lt;br /&gt;#define HWFC false&lt;/p&gt;
&lt;p&gt;RX is connected to P0.12 and Tx to P0.17.&lt;/p&gt;
&lt;p&gt;I can build the project; when setting a breakpoint to the first line current_time = dtm_wait();in the endless-loop for (;;) the system behaves as expected. Pressing then several times F6 (Step over) will result in toggling between the mentioned current_time = dtm_wait() line and the next if(app_uart_get(&amp;amp;rx_byte) != NRF_SUCCESS) instruction; this seems still fine for me. When I press then &amp;#39;Run&amp;#39; I see the supply current heavily increasing to about 4 times of the current before; when I start a test in nRF Connect I see just the same as if the customer board is switched off. When pressing &amp;#39;Suspend&amp;#39; the program flow stops at the if(nrf_timer_event_check(..) function in dtm_wait().&lt;/p&gt;
&lt;p&gt;A breakpoint set to the last line SystemCoreClockUpdate(); in void SystemInit(void) in system_nrf52.c is never reached...&lt;/p&gt;
&lt;p&gt;What is here wrong?&lt;/p&gt;[/quote]
&lt;p&gt;Given that you are able to debug the main application, it shows that debugging in general is working. The SystemCoreClockUpdate() is essentially an empty function updating only one variable, it might be that a optimized application updates it as a part of the .data (non zero initialized RAM) section instead.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not sure what is happening here, because based on your description, the firmware runs as expected. Could you share a bit more info on where the DTM process fails on the tester side?&lt;/p&gt;
&lt;p&gt;How did you connect your TXD/RXD pin to the upper tester, through a USB/UART bridge?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>