nRF52840 DTM Can not communicate with my custom device.

Hi,

My custom board use nrf52840.
I first tested uart function by examples/peripheral/uart/*. It is good.
My board's uart ports are P1.9 for TX, P0.12 for RX.

And then, I modified the nRF5_SDK_17.1.0_ddde560\examples\dtm\direct_test_mode/main.c
But, it is not working with nRF Connect for desktop/Direct Test Mode.
I find " Can not communicate with my custom device." error.

And, I modify TX/RX port in main.c of dtm example to as follow

P0.05 RTS
P0.06 TXD
P0.07 CTS
P0.08 RXD

And compile and upload to nrf52840 DK board.
But, Direct test Mode appl do upgrade nrf52840 DK board firmware to some binary(maybe pre-compiled version by Nordic)
And DTM test is success by your binary.

Wha problem in my product?

BR
Paul

Parents
  • Hi,

    But, Direct test Mode appl do upgrade nrf52840 DK board firmware to some binary(maybe pre-compiled version by Nordic)
    And DTM test is success by your binary.

    What do you mean, it works when using the pre compiled binaries on your custom board but it doesn't work when you use your modified code?

    paul0208 said:
    For DTM, do I have to assign RTS/CTS pin?

    Here:

    regards

    Jared

  • Hi,

    Thanks for reply.

    I have download nRF5_SDK_17.1.0_ddde560 newly for clarify.
    And, compile at nRF5_SDK_17.1.0_ddde560\examples\dtm\direct_test_mode\pca10056\blank\armgcc without modify.
    I program the compiled hex file to my DK 52840 DK board and run "Direct Test Mode" App on nRF Connect for desktop. But I found as follow error popup window


    When I press Program button, "Direct test Mode" App updates my DK board by some binary automatically.
    Start Test is OK

    I did not modify dtm example.

    BR
    Paul

  • After update the DK board, I have read back DK board program again.

    But compiled binary of example as follow.

    Some different between good and bad.

  • Hi,
    I know that a support engineer has been assigned to this ticket.
    When can I get the support?

    BR
    Paul

  • paul0208 said:
    I have download nRF5_SDK_17.1.0_ddde560 newly for clarify.
    And, compile at nRF5_SDK_17.1.0_ddde560\examples\dtm\direct_test_mode\pca10056\blank\armgcc without modify.
    I program the compiled hex file to my DK 52840 DK board and run "Direct Test Mode" App on nRF Connect for desktop. But I found as follow error popup window


    When I press Program button, "Direct test Mode" App updates my DK board by some binary automatically.
    Start Test is OK

    I did not modify dtm example.

    I think I need to clarify how the DTM test should be run. There is several options for running a DTM test, one of the options is to use a development kit as a tester. You have the development kit where you flash the software from the nRF Connect DTM, and then you have the device that you want to test, where you flash the DTM example from the SDK. The picture that you shared is not an error, but it is telling you that the device that you want to use as a tester doesn't have the proper DTM tester application programmed. 

    You need to:

    1. Flash the Development kit with the nRF Connect DTM application.
    2. Modify the DTM example from the nRF5SDK so that the UART pins fits your custom board, and then flash it to your custom board.
    3. Perform DTM test

    See this note for more information.

    regards

    Jared 

  • Hi, Jared

    You said nRF5SDK original example should work on DK board. It is correct or not?

    I have modify DTM example to fit UART pin for my custom board, but nRF Connect DTM can not recognize my custom board, *communication error*.

    OK. I will do this again.

    static void uart_init(void)
    {  
        uint32_t err_code;
        const app_uart_comm_params_t comm_params =
          {
              NRF_GPIO_PIN_MAP(0,12), // RX_PIN_NUMBER,
              NRF_GPIO_PIN_MAP(1,9), // TX_PIN_NUMBER,
              NRF_GPIO_PIN_MAP(1,16), // RTS_PIN_NUMBER,
              NRF_GPIO_PIN_MAP(1,15), // CTS_PIN_NUMBER,
              APP_UART_FLOW_CONTROL_DISABLED,
              false,
              DTM_BITRATE
          };

        APP_UART_FIFO_INIT(&comm_params,
                           UART_RX_BUF_SIZE,
                           UART_TX_BUF_SIZE,
                           uart_error_handle,
                           APP_IRQ_PRIORITY_LOWEST,
                           err_code);

        APP_ERROR_CHECK(err_code);
    }


    BR
    Paul


Reply
  • Hi, Jared

    You said nRF5SDK original example should work on DK board. It is correct or not?

    I have modify DTM example to fit UART pin for my custom board, but nRF Connect DTM can not recognize my custom board, *communication error*.

    OK. I will do this again.

    static void uart_init(void)
    {  
        uint32_t err_code;
        const app_uart_comm_params_t comm_params =
          {
              NRF_GPIO_PIN_MAP(0,12), // RX_PIN_NUMBER,
              NRF_GPIO_PIN_MAP(1,9), // TX_PIN_NUMBER,
              NRF_GPIO_PIN_MAP(1,16), // RTS_PIN_NUMBER,
              NRF_GPIO_PIN_MAP(1,15), // CTS_PIN_NUMBER,
              APP_UART_FLOW_CONTROL_DISABLED,
              false,
              DTM_BITRATE
          };

        APP_UART_FIFO_INIT(&comm_params,
                           UART_RX_BUF_SIZE,
                           UART_TX_BUF_SIZE,
                           uart_error_handle,
                           APP_IRQ_PRIORITY_LOWEST,
                           err_code);

        APP_ERROR_CHECK(err_code);
    }


    BR
    Paul


Children
  • paul0208 said:
    You said nRF5SDK original example should work on DK board. It is correct or not?

    That is correct, the unmodified example should work on the DK, but you were mentioning custom board as well, so I understood it as you wanted to do DTM test on your custom board using the DK as a tester. 

    paul0208 said:
    I have modify DTM example to fit UART pin for my custom board, but nRF Connect DTM can not recognize my custom board, *communication error*.

    nRF Connect shouldn't be connected to your custom board, it should be connected to your DK if I have understood what you want to do correctly.

    Can you clarify what you want to do? Do you want to use the DK as a tester and perform DTM test on your custom boad?

    regards

    Jared 

  • Hi,
    I want to do DTM test  for my custom board by nRF Connect DTM directly. not thru DK board.

    This is my history to test

    1. I have modified example source code of UART, and compile and upload to my custom board.
    2. but nRF Connect DTM app did not recognize my custom board. I found "Communication Error"
    3. So, I made this ticket. "nRF52840 DTM Can not communicate with my custom device."
    4. To  exclude my custom board's H/W problem, I wanted to test DK board first.
    5. After compile example WITHOUT any modify and upload to DK board, but nRF Connect DTM can not recognize uploaded F/W on DK board as I mentioned before. 

    I want to test my custom board by nRF Connect DTM directly thru USB UART.

    BR
    Paul

  • Hi,
    My board use 1.8V. Can I program this board by nRF52840 DK or nRF52832 DK ?

    BR
    Paul

  • Hi,

    paul0208 said:
    I want to do DTM test  for my custom board by nRF Connect DTM directly. not thru DK board.

    This is not supported, you either have to use a DK or a Anritsu as a production tester. This is described in the app note I shared earlier:

    paul0208 said:
    My board use 1.8V. Can I program this board by nRF52840 DK or nRF52832 DK ?

    From the documentation:

    Note: The voltage supported by external debugging/programming is VDD voltage. Normally, this is 3 V when running from USB, but if the onboard nRF52840 SoC is supplied from either USB or Li-Ion, the nRF power source switch (SW9) is in either Li-Po or USB position, and VDD can be set by the nRF52840 firmware. Make sure the voltage level of the external board matches the VDD of the nRF52840 DK.

    regards

    Jared 

  • Hi,


    DUT has UART interface connected to PC or Anritus as Fig 2 you attached.
    And dtm example should be programed into DUT after modifying UART configuration.

    This dtm example is not interworking with nRF connect DTM directly?
    Computer in Fig 2 is not nRF connect DTM?

    BR
    Paul

Related