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

Hardfault in nrf_drv_clock_hfclk_request() with S112 softdevice/nRF52810

I have the following trivial program which has almost identical functionality to the connectivity/ble_connectivity/pca10040e example:

int main(void)
{
    uint32_t err_code =0;
    
    err_code = nrf_drv_clock_init();
    if ((err_code != NRF_SUCCESS) &&
        (err_code != NRF_ERROR_MODULE_ALREADY_INITIALIZED))
    {
        APP_ERROR_CHECK(err_code);
    }
    
    nrf_drv_clock_hfclk_request(NULL);broken.zip

I am using the S112 softdevice, which I have programmed to the nRF52 Development Board (pca10040) which has an nRF52832 chip emulating an nRF52810.

I have used the ble_connectivity/pca10040e project as a template and when I compile and run the ble_connectivity project, it runs perfectly.

I have also taken the ble_connectivity project and reduced it to the bare essentials, so that it is identical to my trivial project.

ble_connectivity works, mine hardfaults.

  • The sdk_config.h is identical
  • The linker configuration file is identical
  • After the stripdown of the ble_connectivity project, the main.c file in both projects are identical.
  • The compiler settings are identical (no optimisation).

I've run out of things to try. Please help.

Parents Reply Children
Related