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

Issue flashing custom boards and relationship crystal

I'm having issues trying to program a custom board with NRF52832_QFAB in DC/DC config. I couldn't reach a complete programming because I'm getting an error in open ocd with two programmers:

1. STLink V2:

2. NRF52DK (JLink)

I get same error in both:  

Error:  Open failed
in procedure init
in procedure ocd_bouncer

I have checked connections between SWDIO, SWDCLK, VCC, GND, and they are right.  Lastly, what I did was verify my schematic and I found three issues:

1. Cap connected to DEC1 in recommended schematic is 100 nF, and I connected 10 nF

2. There is a missing capacitor in 36 pin that is one VDD. However, other VDD connections have their own decoupling cap.

3. I haven't realized that my ext crystals have a different internal capacitance, and I used the same load caps recommended in schematic by NRF52 product specification pdf. (For 32 MHz crystal recommended is CI of 8pF, and what I have is 8 pF).

I would like to ask if one of these three could be affecting programming cycle. I do really appreciate your help.

  • When the chip powers up, it will be using the internal RC oscillator, and it will continue to do so until software running on the CPU switches over to a different clock source. This is true for both the 32MHz crystal for the high frequency clock and the 32.768KHz crystal for the low frequency clock.

    This means that with a blank flash, the CPU must use the internal RC oscillator and the external crystals don't really matter.

    A friend and I are working on a project with the nRF52840 and we followed the reference design of the nRF52840 DK with regards to the SWD pins, and it worked fine first time out of the box. We use the Olimex ARM-JTAG-USB-H debugger. The same debugger also works with the nRF52840 DK board. We used 10K pullup resistors on the SWDCLK, SWDIO and SWO pins.

    -Bill

  • Hi,

     

    Try soldering a 100nF on DEC1, incorrect decoupling here can make the onboard power supply unstable.

     

    Best regards,

    Andreas

Related