SAADC(two channel) Differencial Sampling by External 62.5KHz Clock Interrupt.

I am developing a product using the nRF52840.
I am currently running into a difficult problem. I inquired about it 2 years ago, but it has not been resolved.

I need to process Two Channel (Diffrencial) type saadc by using an external 62.5Khz interrupt.
However, the nRF52840 doesn't seem to be able to handle this speed.
The SAADC handler comes out too late.
I use s140_nrf52_7.2.0_softdevice.hex for soft device.

Please give me an answer on how to implement saadec two channel diffrencial type sampling at 62.5Khz rate.

Parents
  • This product must be sampled for about 5 seconds with Two ADCs (set to Diffrencial) in synchronization with an external 62.5KHz clock. The sampling period is only about 5 seconds. Instead, the sampling rate is 62.5KHz, which is very fast and the most important part.

    The measured data is collected in RAM, and when the measurement is finished, it is transmitted sequentially through BLE or UART.

    62.5KHz ADC Sampling and BLE transmission do not occur at the same time.
    This means that only the ADC should operate at 62.5KHz for about 5 seconds.

    Is 62.5KHz sampling possible if I use the PPI?
    Any examples to reference?

Reply
  • This product must be sampled for about 5 seconds with Two ADCs (set to Diffrencial) in synchronization with an external 62.5KHz clock. The sampling period is only about 5 seconds. Instead, the sampling rate is 62.5KHz, which is very fast and the most important part.

    The measured data is collected in RAM, and when the measurement is finished, it is transmitted sequentially through BLE or UART.

    62.5KHz ADC Sampling and BLE transmission do not occur at the same time.
    This means that only the ADC should operate at 62.5KHz for about 5 seconds.

    Is 62.5KHz sampling possible if I use the PPI?
    Any examples to reference?

Children
  • What you are asking about here I believe is explained in the SAADC chapter:
    https://infocenter.nordicsemi.com/topic/ps_nrf52840/saadc.html#concept_continuous

    There is a calculation showing fSAMPLE < (1/(fACQ + tCONB)), best case (<10kohm source) < (1/(3us + 2us)) < 200kHz.

    Note that in your case you are sampling two channel at 62.5Hz, which in this case translate to 125kHz since there is only one ADC that sample 2 channels. So if you connect a TIMER with a timeout of (1/125kHz=) 8us, then every other analog input is sampled at 62.5kHz (with an offset of 8us).

    So yes, this can work, not though that sampling for 1 seconds will require 2byte * 2samples * 62.5k = 250kByte, so you need to offload this to some external memory in between here.

    There should be ppi examples in the SDK.

    Best regards,
    Kenneth

Related