nrf51822's SWDIO/nReset pin is controled by a MCU GPIO output, a 1k resistor is in series. SWDCLK is connected to a pull-down resistor. And sometime (very rare) nrf51822 can't be reset by the GPIO. It cannot be reset unless powered on again. And the reson is most likely due to interference.
But why, is the chip entered the debug mode. Do I need to attach a capacitor from SWDIO/nReset to ground. If the capacitor is attached, will it affect the firmware download.