This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with SAADC examples for audio sampling

I am using nRF52 pca10400 and I would sample some audio signal for short periods of time, but I found a lot of difficulties with the SAADC example from sdk 13, since if I put a value greater than 126 in SAMPLES_IN_BUFFER I get overflow.

image description

I would also increase the sampling frequency by the variable ticks, but the minimum value allowed is 1 [ms] for this variable since it is declared as uint_32. So it means I can reach a maximum sampling frequency of 1kHz (?).

image description

Can I modify in some way the function nrf_drv_timer_ms_to_ticks in order to get a higher sampling frequency?

Thank you.

Parents
  • Hi, thanks for your support. I think that the overflow is from the logging to UART, and it's good to hear. I fixed the sampling frequency to 50kHz (sampling time 20us) with nrf_drv_timer_us_to_ticks and I tried to run again the example with a buffer of 64 samples, obtaining this from the terminal: The first event has correctly 64 samples but the second one has only 60 followed by overflows. How can we fix the UART overflow problem?

Reply
  • Hi, thanks for your support. I think that the overflow is from the logging to UART, and it's good to hear. I fixed the sampling frequency to 50kHz (sampling time 20us) with nrf_drv_timer_us_to_ticks and I tried to run again the example with a buffer of 64 samples, obtaining this from the terminal: The first event has correctly 64 samples but the second one has only 60 followed by overflows. How can we fix the UART overflow problem?

Children
No Data
Related