Hello, all.
I am working on a project in which I got to sample a signal that has a minimum frequency of 1Hz and a maximum frequency of 10kHz (The full range must be faithfully sampled and transmitted) and stream the sampled data via BLE to an Android device. Overall, I made the thing work, not perfectly, however. I am having problems sampling certain frequency ranges. If I configure the SAADC:
- No Oversample mode
- Gain 1/6
- 8-bits
- Vdd/4 Reference
When configured as above, the performance is relatively good for frequencies above 5kHz. But the signal is significantly distorted for lower frequencies, especially, under 1kHz.
If I enable Oversampling, on the other hand, the data is perfectly sampled for frequencies under 1kHz, but the signal is distorted above that.
From the datasheet of the NRF52840, on the last page of the SAADC chapter, I see that the performance is increased when the HFXO is used. In the Segger Embedded Studio debugger, I see that the HFCLKSTAT, field SRC is configured as RC (HFINT source). I would like to test the sampling with the HFXO as the source.
First of all, is the ADC in the NRF52840 capable of correctly sample this whole range of frequencies? Secondly, how could I configure the high-frequency clock to have the HFXO as a source?