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

Efficient SPIM with periodical slave

Dear nRF52832 experts,

I have a SPI slave device which can periodically notify the MCU with data ready (DRDY) signal.  For each DRDY signal, we should perform a SPI transaction to read a sample of less than 30 bytes into RAM buffer. The process will repeat periodically (from 200Hz to 8Khz) when the slave device is in continuous collection status.

I am wondering if we can manage the DRDY and sample reading without troubling the CPU until the sample is in RAM? if it is possible, then can we further to notify CPU once only after N samples are in RAM? 

The raw idea I am thinking is to have below triggering chain: GPIOTE --> SPIM --> COUNTER --> CPU,  since I am very new to nRF52, I am still unsure if the chain is feasible? If yes how to set it up?

Best regards,

yf13

Parents Reply
  • So in my case, I want use s112 with above mentioned SPIM (with GPIOTE/TIMER via PPI), plus console port logging during development phase, can I still take the "nrfx" API approach?

    Yet another question:  given the SPIM has been set to use array list to read samples, once the last sample buffer was filled by SPIM, upon the next SPIM START task, will it restart from the first sample buffer? If yes, this means that we don't have to change SPIM settings in the counter event handler.

    Regards,

    yf13

Children
Related