drivers: adc: saadc: Disable burst mode on unused channels
Burst mode enabled on an unused channel causes a freeze during a conversion consisting of several channels (not including the one with burst mode enabled). Discovered on nRF52832 (nRF52-DK) using the following approach: channels 0-3 are used for application purposes as a sequence channel 4 is used for battery measurements with oversampling After few successful conversions the sequence (channels 0-3) freezes the thread while waiting for semaphore to end the conversion. Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
This commit is contained in:
parent
37d62c6a16
commit
da9b308563
|
@ -479,6 +479,10 @@ static int start_read(const struct device *dev,
|
|||
m_data.positive_inputs[channel_id]);
|
||||
++active_channels;
|
||||
} else {
|
||||
nrf_saadc_burst_set(
|
||||
NRF_SAADC,
|
||||
channel_id,
|
||||
NRF_SAADC_BURST_DISABLED);
|
||||
nrf_saadc_channel_pos_input_set(
|
||||
NRF_SAADC,
|
||||
channel_id,
|
||||
|
|
Loading…
Reference in New Issue