How to use a custom nRF52840 alongside an nRF52840 DK with the DTM module?

Hi all! As a disclaimer; I am a beginner with the Nordic SDK, so my understanding may be wrong. Please feel free to correct any holes in my theory. I am trying to use a custom PCB with an nRF52840 microprocessor with the nRF Connect for Desktop application, specifically the DTM module. The custom 52840 would be my DUT, and I would test it against an nRF52840 Development Kit. I am not sure if I am thinking of the setup correctly and would appreciate any guidance. Here's what I've got currently:

1. The nRF52840 DK can be programmed with the `<>\examples\dtm\direct_test_mode` module, which has the correct pin mappings, etc. Can I use the example as is, should I make modifications?

2. The custom nRF52840 can either be physically connected to the DK via 2 wire UART, by utilizing FTDI UART to USB converter, or by creating a UART to CDC ACM, which would allow the custom PCB to transfer it's UART comms to USB, where the application is running.

-In order to reduce dependency on any external hardware, I have chosen to go with the UART to CDC ACM option. This way, my custom board will communicate with the computer through the Virtual COM port.

-From what I understand, the requirements are to configure 2 wire UART, in my case I have used the nrfx_uarte library. What comes next? Am I to implement callbacks for both the uarte and usb serial, and exchange data between the two from main?

-How will this data go back to the nRF52840 DK once it goes from custom PCB UARTE to USB? Should they have direct communication established?

3. The DTM module should be able to detect my custom PCB once I have established the UARTE to USB communication and should be able to talk to it and the DK at the same time. Is this correct?

Parents Reply Children
  • Hi Jonathan, thanks for the reply. I found useful information in the docs you linked; I was able to program a CDC ACM module on my custom board to interface with USB. Looking back at the docs I think I may still need to go for the UART physical connection despite my intention to avoid doing so.

    I've run into another issue with my development kit (nRF52840DK) which I will use as the Lower Tester. I tried several ways to program the device, through SES (erasing flash and downloading direct_test_mode_pca10056 firmware onto it) as well as using the nRF Connect Programmer to flash the 10056.hex file on the DK.

    However, any time I open the Direct Test Mode module and load the DK, it meets me with

    'Device must be programmed, do you want to proceed?'

    If I select no, when I initiate the test, it just hangs in the Running device setup:



    If I select yes, I get this issue:


    I have the DK connected to my PC via USB (J2), the nRF power source switch is set to VDD. Am I missing something, what could be causing the DK to not recognize the correct firmware being on it?

  • Edit: I was able to connect the nRF52840 DK successfully after following the solution in this thread:

    nRF Connect for Desktop Bluetooth Low Energy - Keeps on saying "Device must be programmed"

    running the nrfjprog --recover command is what allowed me to run the DK with DTM.

    Question, before I go into physical modifications of my custom PCB that will be the DUT in this setup (it has an nRF52840 on it). Can I perform the test using:

    1. the built in UART/virtual COM port for the DK and
    2. CDC ACM implementation on the DUT,

    or will I need UART on my custom PCB as well? If so, is it sufficient to only modify the PIN numbers on the direct_test_mode_pca10056 example of the 17.1.0 SDK?

  • kenny1389 said:
    running the nrfjprog --recover command

    The recover command wipes the unit and "opens" the device as it disables readback protection.

    "Erases all user flash memory and disables the readback protection mechanism if enabled.





    kenny1389 said:
    Question, before I go into physical modifications of my custom PCB that will be the DUT in this setup (it has an nRF52840 on it). Can I perform the test using:

    You will need to have access to the TX and RX pin of the DUT. So if you dont have them available you will need to modify the PIN for the sample. 

    You can use a DK or som other serial to uart converter for communication with the device. 


    Regards,
    Jonathan

Related