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

How does the SAADC "Scan" mode use the "BURST=1"

Section "37.5.3 Oversampling" in the nRF52832 Product Specification v1.2 says that "Oversampling and scan should not be combined" but then later it says "Scan mode can be combined with BURST=1, if burst is enabled on all channels".

If I read the document correctly, "BURST" depends on the "OVERSAMPLE" setting to get it's number of samples. So it seems that when "Scan" mode is used with the "BURST" enabled that there is actually Oversampling done in this way. Is this correct?

I have noticed that in the "nrf_drv_saadc" code that if more then one channel is selected during channel initialization (which is required to enable Scan mode) that the OVERSAMPLE must be disabled. So from this it seems you cannot use the BURST when Scanning?

Also noticed the the "burst" config setting is not available in the "SDK 11.0.0" but is in the "SDK 13.0.0"

Parents
  • The short answer is yes, burst with oversample does averaging.

    Assume the following scenario; Scan is enabled on two channels, and oversample is set to 1. In that case the output will actually be dout[n] = (ch0[n] + ch1[n])/2, which is most times unwanted. However, if you enable BURST it will take 2^oversample samples per channel, and average those. Thus, dout0[n] = (ch0[n]+ ch0[n+TACQ+TCONV])/2 and the same for channel two.

  • Carsten, thanks for your answer it confirmed what I thought. I did modify the driver (made a local copy) to be able to set up the Oversample with Scan (multiple channels enabled) and the burst enabled. It does appear to work correctly.

    Improvement should be made to the documentation to make this more clear and the "nrf_drv_saadc" driver needs to be updated in the SDK to support this ability, it is a rather nice feature!

Reply
  • Carsten, thanks for your answer it confirmed what I thought. I did modify the driver (made a local copy) to be able to set up the Oversample with Scan (multiple channels enabled) and the burst enabled. It does appear to work correctly.

    Improvement should be made to the documentation to make this more clear and the "nrf_drv_saadc" driver needs to be updated in the SDK to support this ability, it is a rather nice feature!

Children
No Data
Related