This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sd_softdevice_enable never return

Hello,

sd_softdevice_enable never returns.

I have no 32.768 KHz crystal but is set lfclk with NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM. I'm running my application on a custom board with a nRF52, S132 SD 2.0.0 alpha 7, jling debug over nRF52 DK.

Debugger show me that i'm trapped in a loop (probably in SD) at 0x9078, 0x907C, 0x907E (BL, CMP, BEQ)

Can someone from Nordic tells me what it's waiting for ?

Parents
  • On some boards i have installed 32 KHz too. I want to write a selftest but 32 KHz is never OK in selftest. I don't know if there is a bug or if it's my Crystal ?

    	nrf_clock_int_disable(NRF_CLOCK_INT_LF_STARTED_MASK);
    	nrf_clock_int_disable(NRF_CLOCK_INT_HF_STARTED_MASK);
    	
    	
    	NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
    	NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
    	__DSB();
    	NRF_CLOCK->TASKS_LFCLKSTART = 1;
    	
    	
    	NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
    	__DSB();
    	NRF_CLOCK->TASKS_HFCLKSTART = 1;
    
    	
    	while (1) 
    	{
    		int code = 0;
    		if (NRF_CLOCK->EVENTS_LFCLKSTARTED != 0) 
    		{
    			code += 1;
    		}
    		if (NRF_CLOCK->EVENTS_HFCLKSTARTED != 0) 
    		{
    			code += 2;
    		}
    		
    		code_with_leds(code, 0);
    		
    	}
    
Reply
  • On some boards i have installed 32 KHz too. I want to write a selftest but 32 KHz is never OK in selftest. I don't know if there is a bug or if it's my Crystal ?

    	nrf_clock_int_disable(NRF_CLOCK_INT_LF_STARTED_MASK);
    	nrf_clock_int_disable(NRF_CLOCK_INT_HF_STARTED_MASK);
    	
    	
    	NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
    	NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
    	__DSB();
    	NRF_CLOCK->TASKS_LFCLKSTART = 1;
    	
    	
    	NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
    	__DSB();
    	NRF_CLOCK->TASKS_HFCLKSTART = 1;
    
    	
    	while (1) 
    	{
    		int code = 0;
    		if (NRF_CLOCK->EVENTS_LFCLKSTARTED != 0) 
    		{
    			code += 1;
    		}
    		if (NRF_CLOCK->EVENTS_HFCLKSTARTED != 0) 
    		{
    			code += 2;
    		}
    		
    		code_with_leds(code, 0);
    		
    	}
    
Children
No Data
Related