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

softdevice_handler_int, never returns.

I'm a newbie so bare with me. I had this code running, saved it, and started another project. I tried not to touch any of the files I had running with the example below, but somewhere along the line I messed something up.

I needed to run this code today so I loaded itinto the eval board, expecting it to run just fine. The build ran without any errors or warnings. However the code hangs when I make a call to softdevice_handler_int

do                                                                                            
    {                                                                                              
        static uint32_t EVT_BUFFER[CEIL_DIV(MAX(                                                   
                                                MAX(BLE_STACK_EVT_MSG_BUF_SIZE,                    
                                                    ANT_STACK_EVT_STRUCT_SIZE),                    
                                                SYS_EVT_MSG_BUF_SIZE                               
                                               ),                                                  
                                            sizeof(uint32_t))];                                    
        uint32_t ERR_CODE;                                                                         
        ERR_CODE = softdevice_handler_init((NRF_CLOCK_LFCLKSRC_XTAL_20_PPM),                                         
                                           EVT_BUFFER,                                             
                                           sizeof(EVT_BUFFER),                                     
                                           (false) ? softdevice_evt_schedule : NULL);      
        APP_ERROR_CHECK(ERR_CODE);                                                                 
    } while (0);

Softdivice_handler_init ends up in arm_startup_nrf51.s line 156

SVC_Handler     PROC
                EXPORT  SVC_Handler               [WEAK]
                B       .
                ENDP
  • what did I change? How do I get the Softdecive to initialize?

Thanks, Clint