Issues with programming/operation of custom PCB with nRF52832

I've just built up a batch of custom PCB's we designed using the nRF52832-QFAA IC's.  I'm attempting to program these with the nRF52-DK, and am following the connection diagram indicated below, with the exception that I have not got the GND_DETECT connected, as I am led to believe this is not necessary.

My custom board is designed around the Internal LDO reference design in the nRF52832 Product Specification, and looks like this:

My 32MHz Xtal has 8pF load capacitance, ESR = 80 ohms and shunt capacitance of 3pF, which appears to be within spec according to the spec for the 64 MHz crystal oscillator (HFXO).

I have erased the nRF52 chip on my DK, so that (I assume) it lets all the GPIO float.  And then I have programmed my custom board with a simple LED blinky program.  Testing of this LED Blinky on the nRF53-DK indicates it is working as expected, but when I flash my custom board, I'm not seeing anything on the appropriate GPIO pin.

I've tested both powering my custom board via the DK, and also powering the custom board from an external PSU.  Checking the current indicates a load of 4-7mA, which seems a bit high. 

Poking around on some other GPIO, I noticed that P0.05 is being switched on/off at about 2200Hz, with a pulse width of ~ 7usec.

I programmed and tested a second production board, and that showed the same behaviour.

I then tested a board that was straight off the production floor and hadn't been programmed, and that wasn't doing anything (as I'd expect).

So, for some reason, code is being flashed to the device, but its not the code I am expecting to be flashed to the device.  I'm trying to toggle P0.17 at about 1Hz with a 50% duty cycle, but instead I'm seeing P0.05 toggle at about 2200Hz with a ~ 2% duty cycle!

Does anyone have any idea what I'm doing wrong?

Cheers,

Mike

Parents
  • Hello,

    We would like to know the answers of following questions:

    Do you have the 32.768kHz crystal mounted also?

    What SDK are you using? NCS and the nRF5 SDK?

    When you build the HEX file that you program to the custom board do you build for the DK or you build for a custom board file?

    Have you tested the radio on a pre-production sample? It seems here is quite few RF components that can effect the performance significantly.

    Are you able read the devices memory with nrfjprog or the programmer app from the nRF desktop app?

    Thanks.

    Best Regards,

    Kazi Afroza Sultana

  • Hi Kazi,

    Thanks for getting in touch.  Answers to your questions:

    1.  Yes, I have the 32.768KHz crystal mounted.  Its the ECS-.327-12.5-34B-C-TR from ECS with 18pF load capacitors

    2. I'm using Visual Studio Code (V1.71.2) as my IDE, and am running V2.0.0 of NCS and v2022.9.179 of the nRF Connect extension for VSC.

    3. I am using the nrf52dk_nrf52832.dts board file when I build my code.

    4. I have not yet tested the radio on my board, as I can't even get a simple LED blinky code running on it as yet.

    5. Yes, I can read the devices memory.  I did a comparative test here, following this process:

    (a) Programmed DK with a different version of code

    (b) Programmed my device using the LED blinky code.  Then read this back and saved as a file

    (c) Disconnected my device and then read back the code in the DK.  Checked this against the file in (b).  I didn't do an exhaustive comparison, but I could see the files were different

    (d) Programmed my DK with the same code I had programmed the device with in (b)

    (e) Read back the file from my DK and compared this to the file I read back in (b).  Again, I didn't do an exhaustive comparison, but it looked to me like they were the same file.

    So, this seems to indicate that my device is actually being programmed, but for whatever reason its not actually running the code as expected.

    I've disconnected all physical connections to my device apart from the crystals, the VDD/GND and SWDIO/SWDCLK signals and all the various PSU decoupling capacitors.

    Regards,

    Mike

Reply
  • Hi Kazi,

    Thanks for getting in touch.  Answers to your questions:

    1.  Yes, I have the 32.768KHz crystal mounted.  Its the ECS-.327-12.5-34B-C-TR from ECS with 18pF load capacitors

    2. I'm using Visual Studio Code (V1.71.2) as my IDE, and am running V2.0.0 of NCS and v2022.9.179 of the nRF Connect extension for VSC.

    3. I am using the nrf52dk_nrf52832.dts board file when I build my code.

    4. I have not yet tested the radio on my board, as I can't even get a simple LED blinky code running on it as yet.

    5. Yes, I can read the devices memory.  I did a comparative test here, following this process:

    (a) Programmed DK with a different version of code

    (b) Programmed my device using the LED blinky code.  Then read this back and saved as a file

    (c) Disconnected my device and then read back the code in the DK.  Checked this against the file in (b).  I didn't do an exhaustive comparison, but I could see the files were different

    (d) Programmed my DK with the same code I had programmed the device with in (b)

    (e) Read back the file from my DK and compared this to the file I read back in (b).  Again, I didn't do an exhaustive comparison, but it looked to me like they were the same file.

    So, this seems to indicate that my device is actually being programmed, but for whatever reason its not actually running the code as expected.

    I've disconnected all physical connections to my device apart from the crystals, the VDD/GND and SWDIO/SWDCLK signals and all the various PSU decoupling capacitors.

    Regards,

    Mike

Children
Related