This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51822 controller connection through UART/SWD.

I need to program the nrf51 controller directly from PC. How to connect nRF51822 controller from PC through UART/SWD pins to program.

Parents
  • Hi,

     

    See the debug out section of the nRF51 DK User Guide. On either P20 or P19 you need to connect 

    SWDIO->SWDIO

    SWDCLK->SWDCLK

    VDDTG->VDD

    GNDDETECT->GND

     

    Note that you need to power your custom board, VDDTG does not supply it.

     

    Best regards,

    Andreas

  • OK thank you...but i am not using the DK board..i have the nrf controller on my pcb..i have taken out the swdio and swdclk pins to the connector along with the uart pins..kindly help me with how to connect these pins from the PC.

  • Hi,

     

    You need to translate the SWD interface and the UART interface to something the PC understands. For SWD a J-Link debugger is typically used, other SWD debuggers can be used but you might experience various incompatibility with our other tools. For UART any UART to USB translator can be used.

    nRF51-DK comes with an on-board J-Link debugger and UART translator combo MCU for easy interfacing. Furthermore it is 100% supported with all our tools. If you do not have any debugger or UART translator I recommend getting your hands on a nRF51-DK, or even nRF52-DK (compatible with external nRF51 boards).

     

    The setup is the same though, you need to connect SWD as explained below to the debugger, no matter which debugger is used, and UART RXD->TXD and TXD->RXD no matter which translator is used.

     

    Best regards,

    Andreas

  • Thanks for the reply.

    In nRF51 DK board will it support UART connection for programming even if we bypass the connection of MCU and try direct programming form pc to nRF controller.

  • Hi,

     

    There is a nRF51822 on the DK itself which you will need to disconnect from the UART lines in order to use UART with your external nRF51822 board. Or you can just remove the power supply for the on-DK nRF51822, there are solder bridges for easy cutting of all relevant lines.

    For programming of the external board SWD will be used, this can be done in parallel with the nRF51822 on the DK.

     

    Best regards,

    Andreas

Reply
  • Hi,

     

    There is a nRF51822 on the DK itself which you will need to disconnect from the UART lines in order to use UART with your external nRF51822 board. Or you can just remove the power supply for the on-DK nRF51822, there are solder bridges for easy cutting of all relevant lines.

    For programming of the external board SWD will be used, this can be done in parallel with the nRF51822 on the DK.

     

    Best regards,

    Andreas

Children
Related