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 Children
  • Hi.

    Then you should enable that one as well. That will enable the SoftDevice Handler SoC Module.

    And sorry, I made an error in my previous reply, what I ment by enabling the SoftDevice handler was to set the following in sdk_config:

    // <e> NRF_SDH_ENABLED - nrf_sdh - SoftDevice handler
    //==========================================================
    #ifndef NRF_SDH_ENABLED
    #define NRF_SDH_ENABLED 1
    #endif

    Best regards,

    Andreas

Related