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

BLE UART+ADC

Hello,

I successfully flashed the experimental_ble_app_uart, I just modified it to do an echo (when I send something with my phone uart app, it give me back the same value)

now, I'd like to use ADCs (I help me with adc_example_with_softdevice_and_UART) but when I try to use the timers:

    // ADC timer handler to start ADC sampling
    static void adc_sampling_timeout_handler(void * p_context)

{
	uint32_t p_is_running = 0;
		
	sd_clock_hfclk_request();
	while(! p_is_running) {  							//wait for the hfclk to be available
		sd_clock_hfclk_is_running((&p_is_running));
	}               
	//nrf_gpio_pin_toggle(LED_2);		//Toggle LED2 to indicate start of sampling
	NRF_ADC->TASKS_START = 1;							//Start ADC sampling
}
    static void timers_init(void)
    {
    	  uint32_t err_code;
    	
        // Initialize timer module
    		APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);
    	
    		err_code = app_timer_create(&m_adc_sampling_timer_id, APP_TIMER_MODE_REPEATED,adc_sampling_timeout_handler);
        APP_ERROR_CHECK(err_code);
    }

My application compile but doesn't run (ble not detected)

(I'm using :

  • nRF_Examples.7.2.0
  • keil 5
  • s110_nrf51822_7.1.0_softdevice)

Any ideas ? Thank you

Parents Reply Children
No Data
Related