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.

  • Hello,

    Maybe you can share a link to the case you had two years ago so I can see what was done at the time?

    Looking at the saadc chapter in the datasheet:
    https://infocenter.nordicsemi.com/topic/ps_nrf52840/saadc.html

    In specific Figure 4:
    https://infocenter.nordicsemi.com/topic/ps_nrf52840/ip/saadc/doc/image/saadc.svg 

    It looks like this should be possible for instance by a gpiote event->ppi->sample task, then once the buffer is full you get an END event which you can handle in the SAADC interrupt. Then you don't need to handle the data at 65kHz (~15us), but for instance every 1.5ms (assuming a 100byte buffer, likely you need to double buffer, so one buffer can fill up while you are handling the other). Also I expect you need to have a ppi between END event and START task, so the next buffer is used automatically when the END event occur.

    I expect the main problem here will be the throughput the BLE link must handle, e.g. if you assume every sample here is 10bit, and you are able to shift 3 10-bit samples into a 32bit word. Then you need a steady throughput of roughly 700kbps, and you can't expect to get this high throughput steadily over time, and I assume you are also interested in relative low latency here (e.g. of sub <100ms). 

    So I expect the problem here is not that the hardware can't handle the data throughput, the main limitiation will be the BLE link throughput.

    Best regards,
    Kenneth

  • The place I inquired about two years ago was private question.
    Can I post a private question link here?

  • Hello,

    The other threads were long, I did not read all no. But I get the impression that the same discussion was performed two years ago and there have been no fundemental changes to hardware or software that will make this possible today. I can also see in the other thread that you want to measure 2 analog inputs, ref: "This technology receives 62.5kHz through the interrupt pin (P.7), and needs to sample 2 ADC channels in synchronization with this interrupt clock." This is the double of my throughput calculations.

    You may consider using the nRF5340 instead, then you can do all the ADC sampling on the application core and the network core will do the BLE link. However the BLE will be the same, so I don't see how you are able to transfer the amount of data you want here. Have you done any calculations on the throughput you need on the link?

    Kenneth

  • 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?

Related