I am using SDK 15.3, SES 4.3 and SD 130. I've added the saadc example code into my code which is comprised of the ble_central, nordic UART and saadc.
I've changed the timer instance from 0 to 1 and 2 because of the softdevice:
static const nrf_drv_timer_t m_timer = NRF_DRV_TIMER_INSTANCE(1);
#define SAMPLES_IN_BUFFER 5 volatile uint8_t state = 1; static const nrf_drv_timer_t m_timer = NRF_DRV_TIMER_INSTANCE(1); // Eric - changed from 0 to 1 since 0 is used by SD static nrf_saadc_value_t m_buffer_pool[2][SAMPLES_IN_BUFFER]; static nrf_ppi_channel_t m_ppi_channel; static uint32_t m_adc_evt_counter; // APP_TIMER_DEF(saadc_timer); // Eric - added this line. Code doesn't seem matter. void saadc_timer_handler(nrf_timer_event_t event_type, void *p_context) { saadc_callback(); printf("saadc timer timed out"); }
I thought that the app_timers used timer instance 1 and they are working fine. I've also tried timer instance 2 but it didn't solve anything.
Please tell me what I am missing here.