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

Purpose of RESULT.MAXCNT

Hi

What is the role of RESULT.MAXCNT ?

As the scan mode is based on the number of channels with PSELP != 0 isn't MAXCNT redundant ?

Also, If declaring the buffer as buffers[2][100*4] (for 4 channels scan set):

- Should the size parameter in the initial call to to nrfx_saadc_buffer_convert() be set to 4 or 400 ?

- Will END event be fired after 4 samples (as there are 4 PSELP registers != 0) or 400 ?

Thanks

Parents
  • Hi,

    For detail on maxcnt and scan mode check the scan mode and EasyDMA chapters in the documentation. See Figure 2. Example of RAM placement (even RESULT.MAXCNT), channels 1, 2 and 5 enabled.

    Looking at the SAADC example in SDK 15.2 the size parameter should be set to the number of samples in the buffer. 400 in your case.

    The size of the Result buffer is specified in the RESULT.MAXCNT register and the ADC will generate an END event when it has filled up the Result buffer, see Figure 4.

Reply
  • Hi,

    For detail on maxcnt and scan mode check the scan mode and EasyDMA chapters in the documentation. See Figure 2. Example of RAM placement (even RESULT.MAXCNT), channels 1, 2 and 5 enabled.

    Looking at the SAADC example in SDK 15.2 the size parameter should be set to the number of samples in the buffer. 400 in your case.

    The size of the Result buffer is specified in the RESULT.MAXCNT register and the ADC will generate an END event when it has filled up the Result buffer, see Figure 4.

Children
No Data
Related