NRF52810 Cannot change pins on DTM example

Hello,

I am currently having my product, which is based on the nrf52810 SOC, tested and certified. I have been told to set my device up to use the DTM firmware example in order for the testing agency to effectively test the device. I do not have access to pins 6 and 8, which are the default pins for the DTM example (they are used by other hardware), so in order to work around this I changed the RX and TX pins to open GPIO pins on the device. This has not been successful, the DTM software gives me a simple error message saying that it cannot communicate with the device and to make sure that the correct firmware is uploaded. I have tried a shared ground between my UART adapter (sparkfun) and other solutions however none have made a change. If I probe the device while it is running, it is clear that it has not hit an error, the device continues running though the main loop. I have also went into the board header file (pca100040.h) and made sure that there are no pins assigned to the ones I am using for RX and TX. Any suggestions on how to solve this issue would be appreciated.

Thank you!

M

  • Hi,

    Are you using the nRF5 SDK or the nRF Connect SDK? As you mention the file pca100040.h I will assume the nRF5 SDK for now (specifically 17.1.0, though this should be valid for any recent version).

    If you have built for the PCA10040 (nRF52 DK), then pca10040.h is the right file to modify to change RX_PIN_NUMBER and TX_PIN_NUMBER, which are used in uart_init() in examples/dtm/direct_test_mode/main.c. If you are building for another board, you should use the board file for that. Alternatively, you could replace the defines in uart_init() with the specific pins (if you want P0.20 for Rx, write 20 instead of RX_PIN_NUMBER).

    If you have been able to modify the right defines, there is another possible pitfall: The pin numbers used are the GPIO pin numbers (so P0.20 would be 20, even though that is pin 23 in the QFN48, for instance). See Pin assignments for details on this.

  • Hey Einar!

    If you have been able to modify the right defines, there is another possible pitfall: The pin numbers used are the GPIO pin numbers (so P0.20 would be 20, even though that is pin 23 in the QFN48, for instance). See Pin assignments for details on this.

    Turns out this was what was wrong... I put the pins in as they are labeled as gpio pins and the DTM software fired right up. 

    Thanks so much for the help! Enjoy the holidays!

    M

Related