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

S110 Soft Device and Analog Inputs

I have an application that reads an nRF51822 pin configured as analog input and then sends that value using "ble uart" (included in Nordic's sdk). Analog input is read in an interrupt 250 times per second, but only a few of those values are sent from my main loop (not from interrupt). However, when the connection is established, the analog input stops working but just gives a fixed value (218).

The problem can be solved by initializing analog input in my main loop all the time as follows:

nrf_adc_init(ADC_RES_10bit, ADC_INPUT_AIN3_P02, ADC_INT_DISABLED);

But if I do so, then the BTLE connection hangs up within a half a minute, and actually the whole system probably crashes.

How should I handle ADC when using soft device? Is the soft device using ADC in some way?

Parents Reply Children
Related