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

Issues in nrf_sdh.c file, error: 'SD_EVT_IRQn' undeclared

I am getting this error on SES

"components\softdevice\common\nrf_sdh.c:164:20: error: 'SD_EVT_IRQn' undeclared (first use in this function); did you mean 'QDEC_IRQn'?"

SD_EVT_IRQn is defined in nrf_soc.h file

and I have included it in User Include Directories "../../components/softdevice/s140/headers"

but still, I am getting this error.

Note: I am trying to include softdevice in my project but only this error is hampering me.

DO LET ME KNOW IF ANYTHING IS REQUIRED.

Parents Reply Children
  • I'm not really sure why you're getting an undeclared error if you've already included the file and path it's declared in.  

    Note: I am trying to include softdevice in my project but only this error is hampering me.

    The approach of including the softdevice in an already existing project isn't something we recommend. The easiest approach would be to start with one of the ble examples, such as the ble_app_template example and then integrate your application into the SDK example, instead of doing it the other-way-around. 

    Best regards

    Jared 

  • Try Changing this define in sdk_config.h or what ever SES uses.

    // <i> NRF_SDH_DISPATCH_MODEL_INTERRUPT: SoftDevice events are passed to the application from the interrupt context.
    // <i> NRF_SDH_DISPATCH_MODEL_APPSH: SoftDevice events are scheduled using @ref app_scheduler.
    // <i> NRF_SDH_DISPATCH_MODEL_POLLING: SoftDevice events are to be fetched manually.
    // <0=> NRF_SDH_DISPATCH_MODEL_INTERRUPT 
    // <1=> NRF_SDH_DISPATCH_MODEL_APPSH 
    // <2=> NRF_SDH_DISPATCH_MODEL_POLLING 
    
    #ifndef NRF_SDH_DISPATCH_MODEL
    #define NRF_SDH_DISPATCH_MODEL 0
    #endif


Related