Checking 32kHz OSC and onboard DCDC status by code

I have a board in production where a few percent are failing because of high current consumption - they consume about 1.3mA instead of 300uA. Because this is a low power application they are using onboard DC/DC converter and external 32kHz XTAL.

So I want to add some diagnostic to check operation of the 32kHz oscillator and onboard DC/DC (primary suspect is 32k osc). The trouble with checking the xtal is that just by adding contact with a scope probe significantly changes the capacitance and affects the operation.

So which is the best way of checking the status? As usual, I search and I see some Devzone posts saying that some method e.g. LFCLKSTAT isn't reliable (Case ID: 256193)

Same I would like to verify if the DC/DC converter is operational.

  • Hi

    1.3mA is too high for this to be the 32kHz oscillator I think, But to confirm if the Low Frequency Crystal Oscillator (LFXO) is being used in your project, you can check the configuration of the LFCLKSRC register. as the LFCLKSRC register controls the clock source. More info in the clock control documentation here.

    For the DCDC, can you confirm that the correct components for DCDC has been added to your HW? Same as for checking the LFXO, you can read the DCDCEN register to check if the DCDC regulator is used in your project or not.


    Are you able to reproduce this high current consumption on an nRF52 DK or just on your custom board? Also, what is your project doing exactly? 1.3mA is very high, and to me it seems this is the radio running for some reason, but it's hard to say based on what info you have provided.

    Best regards,


  • Hi Simon

    Sorry I gave you the wrong value - 1.3mA was the peak, the average was 900-ish uA which is still 3x the expected current draw @ 3.3V (300uA with advertising and UART enabled)

    It's hard to detail exactly what's happening on the board: but I can say of 1000 or so made I have maybe a dozen failures. In fact it might not even be the nRF at fault - but I'd like to add these checks anyway to my production test procedure and diagnostics. There is only one other active component on the board which is a 433MHz RF receiver (which is controlled by the nRF, and I would expect it to consume 6mA if activated). There's a lot happening on the nRF chip including BLE GATT DIS, GAP. Peripherals include UART TWI GPIOs NVM 2 x timers plus AES and RNG.

    I'm definately enabling DCDCEN. What I'm trying to trap are manufacturing faults for example if one of the inductors is wrong or not fitted. So I want to find out if the DC/DC is actually being used, not whether it is enabled.

    Also, if you look at the case I mentioned, someone mentioned that LFCLKSTAT/LFCLKSRC indicated that the 32k XTAL was running, whereas no XTAL was fitted... it was noise causing the false register value. That was an old thread and not really conclusive... so I wanted to check how suitable/relaible it may be as a check.