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

How to program the NRF51422 without using USB cable

Hi,

We are using nrf51422 in our project.So right now i am loading the program using the Usb cable .Here my doubt is can we able to flash the program by using usb to uart (connecting RX,Tx,Gnd,VCC) .If it is possible can you plz tell me how to load the program or is there any other method. Plz help me in this.

  • Hi,

    The nRF51 devices do not support USB, so I assume you are referring to the USB connector on the nRF51 DK? This is connected to the onboard debugger chip, which in turn is connected to the SWD lines on the nRF51422. The only way to do initial programming of the nRF51 is via SWD, as it is shipped with an empty flash. Using a SWD debugger is also the only way to debug the nRF51. However, you can program the nRF51 via UART if you make and program with a UART bootloader first.

  • Thanks for the reply.

    I have flashed the example program using usb cable.Can you tell me how to flash the program using uart.

    can you give me some hint to program using uart. I am getting any idea.pls help me in this.

  • Hi,

    I would like to reiterate the main points from my previous post:

    • It is not possible to program via USB since the nRF51 does not have a USB interface.
      • Therefore I assume you use an SWD debugger (for instance on the nRF51 DK - if that is what you are using?)
    • The only alternative to programming via SWD is to first program a bootloader of some sort, and then use that to program new firmware.
      • First of all, consider why you want to program via UART. Is it just for testing and development? If so, then it is probably a bad idea, since you anyway need SWD for initial programming, and you loos debugging capabilities. If it is for field updates via a host MCU or similar, it could make sense.
      • If you want to program via UART, you first need to program a UART bootloader. Unfortunately, the latest nRF5 SDK for nRF51 (12.3) does not include a UART bootloader, so you have to make one or port one yourself (for instance add a UART bootloader by referring to how it is done in later nRF5 SDK versions).
  • Thanks for the reply.

    The main reason for doing through uart is we are using nrf51422 in our project.so we are developing customized board of nrf51422 without using pac10028(interface mcu) .So we need to program  directly into the nrf51422 not through pca10028. so we thought of using usb to uart to flash the program.

    can you plz tell me if we use nrf52 series can we able to flash through uart bootloader. 

  • Hi,

    I see. The recent nRF5 SDK versions (which support nRF52 only), have a UART bootloader included, so yere you get that out of the box. Please note that you still need to program the bootloader initially, though.

Related