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

NRF52832 in Hard Fault State.

Hi,

We have made a custom PCB using the NRF52832 chip. While it was working fine for a couple of days, it suddenly stopped working and went to a hard fault. We are not able to figure out the reason for this issue.

We have debugged the PCB and measured the voltages at different points in the circuit.

DEC1 - 750mV

VDD - 3.25V

DEC4 - 1.25V

DEC3 - 3.25V

DEC2 - 1.25V

RESET PIN - 3.25V

Is the voltage at DEC1 effecting the Nordic chip since it should be 0.9V?

Also please let us know when does hard fault usually come. We even ran a simple LED toggle program but even then we got a hard fault error.

Does hard fault mean that the memory of the chip is corrupted? Should we get the chip replaced ?

  • There are a variety of reason why hardfaults occur.

    1. Most common in interrupt priority violations
    2. Referencing an uninitialized potiner
    3. Memory overruns

    If you're certain that your code is fine, id look into your crystal circutry. Make sure they are designed correctly and initialized correctly in FW.

  • See my answer to your other (rather similar) question. If you have a reproducible hardfault you are very lucky because all you need to do is stop the board with a debugger, go look at the registers and stack and work your way backwards.

    I don't know where you got this bizarre 'memory corruption' and 'chip replaced' idea from. That's the absolute least likely reason for hardfault.

  • Thanks Dave. As I mentioned in my question as well, I am just initialising one GPIO pin which has a LED connected and toggling it in a while loop in the main function. The Nordic chip goes to a hard fault state even before initialising a GPIO pin. This obviously means that there is something wrong either in the chip or the crystal circuitry?

  • Thanks RK for the answer. As I mentioned in my question as well, I am just initialising one GPIO pin which has a LED connected and toggling it in a while loop in the main function. The Nordic chip goes to a hard fault state even before initialising a GPIO pin. This obviously means that there is something wrong either in the chip or the crystal circuitry? Is this the correct assumption? I am even trying to read the FICR registers but as it enters main, nordic chip goes to a hard fault state.

  • no it doesn't obviously mean anything of the sort. The fact the chip gets to hardfault (are you even sure it is by the way or is that another guess?) means it's basically working. If the crystal wasn't working it wouldn't matter for the HF one (stays on the RC) and I doubt you've even got to the point of trying to enable the LF one or probably the HF one come to that.

    You need to actually debug the hardfault. You need to read the registers and you need to work back to find out why you have hardfaulted. Stop guessing and handwaving about bad hardware, hardfaults leave a trail behind them, follow it.

Related