Hello everyone,
I use SDK14.2 and s132 softdevice. I can read "NRF_SAADC_INPUT_AIN0" and "NRF_SAADC_INPUT_VDD" pins and system is working properly.
Working Code like this;
Now I want to add new ADC pin and read "NRF_SAADC_INPUT_AIN1". I added new configuration in saadc_init function;
nrf_saadc_channel_config_t channel_2_config =
NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN1);
err_code = nrf_drv_saadc_channel_init(2, &channel_2_config);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_saadc_buffer_convert(&adc_buffer[2], 2);
APP_ERROR_CHECK(err_code);
And I add new value variable in saadc_calback function
nrf_saadc_value_t adc_value_2;
adc_value_2= p_event->data.done.p_buffer[2];
NRF_LOG_INFO("adc_value_2= %u",adc_value_2);
I can compile the code but when I upload the code device can not advertise and RTT Viewer output get fail.
"0> <error> app: Fatal error"
Do you have any suggestion ?