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

nRF52832 flashing custom board

Hi,

I know that this question has been asked before but I was wondering if someone can help me understand if the problem is from the connections on my board or my chip is bricked and what the next step would be in my case. I have a custom board and have been trying to flash it via jlink EDU with JFlash Lite. I connected the four required pins SWDIO, SWDCLK, VREF and GND to jlink 20-pin connector pins 7, 9, 1 and 4, respectively. As said here and here, these four pins are enough. Although here it is also suggested to bring out the RESET pin. My first question is:

  • Why does the JLINK datasheet claim that the RESET pin is needed?

In fact first I thought that I missed the RESET pin (because I was not able to perform any erasing or flashing without RESET) and connected it manually to the programmer connector. After this I was able to erase the chip and flash it. But it happened only once and I could not repeat the process. The second question is:

  • Why the RESET pin affected the flashing process? Or does it make any sense that it does so? Is it possible that the JFlash Lite has a different algorithm than for example nrfjprog at least for taking the CPU to the debug mode? And I also tried programming the nRF52 DK through Debug In connected and by JLINK EDU and JFlash Lite. I could not program it without RESET pin connected. But with RESET pin I was able to program it several times and everything was OK.

I got the following error after the first time I could program the device (after this I tried with and without RESET pin connected, but always the same errors):

Erasing nRF52832_xxAA via SWD-Interface@500kHz 
Erase Thread started.
Device "NRF52832_XXAA" selected.
Found SWD-DP with ID 0x2BA01477
Could not power-up debug power domain.
Found SWD-DP with ID 0x2BA01477
Could not power-up debug power domain.
Erase Thread exited 
Initialization of debug session failed.
Could not connect to target.
  • Does this line "Found SWD-DP with ID 0x2BA01477" give any information about the hardware connection? or it might appear even when there is connection problem?

I tried with different values for the frequency. After that I realized I cannot erase the chip anymore, I thought I might have to recover the chip. I tried nRFgo Studio first. I got the error "Recover failed. Can not connect to the device". Then I tried nrfjprog with the following command (as explained here):

 nrfjprog --clockspeed 125 --family nrf52 --recover

and I get the following error:

ERROR: Cannot connect to any nRF device. Please make sure a device is
ERROR: connected to the debugger and supplied.

The power of the device is connected. Otherwise (when there is no power) I get the following error from nrfjprog:

ERROR: Low voltage detected at the target. Please make sure the device is
ERROR: properly supplied.

I did not try programming my custom board by the onboard Jlink programmer of nrf52 DK since I read in one threads that the programmer needs a minimum power about 3V from the custom board. Am I correct? the power in my custom board is 1.8V.

Another question:

  • The RESET pin is configured as IO at the startup, right? because it is pull-down in my board (used as GPIO), and I was thinking if it affects this problem.

I checked the impedance between SWDIO and SWDCLK pins with respect to GND of the circuit. It was several Mohms. I guess it's reasonable right? If so, the soldering is also find in my board.

-Vala

Parents
  • Hi,

    The problem was that the RESET pin of the chip was pull down in my circuit since I had considered it as an IO. In this mode the CPU does not respond to programmer either. I tested the same thing with nrf52DK. I connected the P0.21 of the nRF52832 to GND, then turned on the board and the CPU did not start working.

    I will ask about the RESET pin functionality in another question.

    -Vala

Reply
  • Hi,

    The problem was that the RESET pin of the chip was pull down in my circuit since I had considered it as an IO. In this mode the CPU does not respond to programmer either. I tested the same thing with nrf52DK. I connected the P0.21 of the nRF52832 to GND, then turned on the board and the CPU did not start working.

    I will ask about the RESET pin functionality in another question.

    -Vala

Children
No Data
Related