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

HARDFAULT in mesh SDK ble_mesh_v0.9.1-Alpha access.c

I have the mesh serial example working with nRF51-DK (nRF51422). I am now trying to run the same code, via the nRF51-DK debug port, to a nRF51822 QFAC (32Mb) based board. It downloads and runs up to the following line where I get a HARDFAULT:

static void access_state_clear(void)
{
    memset(&m_model_pool[0], 0, sizeof(m_model_pool));

A break at this line shows the m_model_pool memory is allocated (it's static anyway) and accessible. Stepping over this line gives a HARDFAULT. What might be causing this?

The nRF51-DK (nRF51422) and the nRF51822 QFAC have the same memory maps so I am using the same build settings.

Simon

  • Hi Simon,

    This is very strange, indeed. Here's a some debugging questions:

    • Did you modify the example code in any way?
    • Are you using a different clock source on the external board, and is the softdevice (and mesh) initialized with the correct one?
    • Did you get a program counter address with the HARDFAULT? If so, could you provide the .elf and .map file along with the address of the fault?
    • Is anything of this running in an IRQ? Calling a softdevice function from an interrupt priority higher than the SVC will hardfault.

    I hope we'll get the problem solved soon.
    Best,
    Thomas

Related