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

Issue with NRF_SDH_SOC_OBSERVER

Hi,

I use NRF52840 on a custom board. I am utilizing low-level SoftDevice flash API for accessing flash:

sd_flash_page_erase() and sd_flash_write().

I want to register an event handler so that I can received notification when the flash operation is done and also to receive the status.

I did it by calling NRF_SDH_SOC_OBSERVER as follow:

NRF_SDH_SOC_OBSERVER(m_soc_evt_observer, 0, FlashEvtHandler, NULL);

However, I got this compile error: "the size of an array must be greater than zero"

What did I do wrong?

Does it refer to m_soc_evt_observer? I couldn't find its declaration in the library nor in the example code.

Thank you.

Parents Reply
  • Hi.

    Sorry for the late reply, I have been away.

    What i meant by enabled the SoftDevice handler is that it is enabled in sdk_config.h:

    // <e> NRF_SDH_BLE_ENABLED - nrf_sdh_ble - SoftDevice BLE event handler
    //==========================================================
    #ifndef NRF_SDH_BLE_ENABLED
    #define NRF_SDH_BLE_ENABLED 1
    #endif

    And that these files are included in your project:

    Edit: More documentation on the SoftDevice handler can be found here.

    Best regards,

    Andreas

Children
Related